LabVIEW Embedded

cancel
Showing results for 
Search instead for 
Did you mean: 

lm3s8962 - SPI and microSD memory

Solved!
Go to solution

Hello again,

First of all I'm using LabView 2009 and its corrosponding ARM module.

 

I'm trying to communicate with the SD card on the Luminary board (yes i did put one in) using the ARM SPI functions.

0 Kudos
Message 1 of 16
(9,929 Views)

Oops, accidentally posted instead of adding the attachment.

testSPI.JPG

 

So, tell me why my little program won't work?

 

Other information: 

  1. The chip select does not go true (until i forced it in the void ARM_SPI_CreateConfigurationReference() routine)
  2. With the CS forcibly enabled the CS, ssiClk and ssiTx lines all scope good, but i see no read clocks after the write and the RX line stays high
  3. No read data array appears on the output of the write/read vi.

I have verified the gpio lines are the correct ones

 

Thanks!

David

0 Kudos
Message 2 of 16
(9,928 Views)
Solution
Accepted by topic author David-n-MO

You don't need to use SPI VIs for accessing files.
Welcome to the "snippets" world:

 

 files examples in LV for ARM.png

 

Create a new project, drag the snippet and ... voila:

 

output window.PNG

Message 3 of 16
(9,913 Views)

Wow, snippets are cool and so is the ARM file i/o.

 

After posting my problem I was READING of the new features in 2009 and learned about the ARM file i/o.  However i couldn't see how to implement it because the RefNum out of the open connects to the "file" input of the read and write functions.  Also, i thought the path input to the open would somehow have to point to the SD card....  Like drive C:\.   Sometimes locating the pertinent information is the hardest part.

 

Thanks! You've solved my immediate problem, but i'd still like to know what is up with the SPI functions because I'd like to use them to control an off board IC.

 

David

0 Kudos
Message 4 of 16
(9,895 Views)
Michael explained very well how to encode the "chip select" input here: http://forums.ni.com/ni/board/message?board.id=420&message.id=920#M920

You better restore the SPI driver from template and encode properly that input.
Unfortunately, I have to warn you about couple issues:
-file support and SPI/Display VIs cannot be used in the same application
-don't use Display VIs until closing SPI reference.
I can post here couple workarounds here if needed.
0 Kudos
Message 5 of 16
(9,887 Views)

Thank you for the snippet and the SPI link.  All i initially needed to do was save a handful of configuration settings to be read on startup and that is now working just fine.

 

When possible i test problem code in a separate project, so accidentally trashing the spi driver wasn't much of a concern.

 

I have to thank all of the folk on this forum for the quick responses i've had.

 

David.

0 Kudos
Message 6 of 16
(9,865 Views)
I have a feeling I already know the answer (NO), but does this also work for LabVIEW Embedded for Blackfin?
0 Kudos
Message 7 of 16
(9,744 Views)

I have exactly the same question.. I'm using just one ADC via SPI, but I'll need to use about 8..

Thanks in advance

António Veríssimo de Freitas
Universidade de Aveiro Student
0 Kudos
Message 8 of 16
(9,730 Views)

LabVIEW 2009 for Blackfin (the LabVIEW 2009 Embedded Development Module for ADI Blackfin Processors) does not have File I/O support - at least not through the native LabVIEW VIs.  You can see all new 2009 features in the LabVIEW for Blackfin help file.  Note that in the LabVIEW for ARM 2009 help file, File I/O is listed.

 

Kevin S.

Applications Engineer

National Instruments

Message Edited by Kevin_S on 08-31-2009 10:33 AM
0 Kudos
Message 9 of 16
(9,713 Views)
my question was only about Chip Selecting each SPI device..
António Veríssimo de Freitas
Universidade de Aveiro Student
0 Kudos
Message 10 of 16
(9,706 Views)