SPI Example
-
- Posts: 622
- Joined: Mon May 12, 2008 10:55 am
SPI Example
There don't appear to be any SPI bus examples in the NB software package. Are there any available?
Re: SPI Example
have you looked here ?
C:\nburn\examples\mod5270\QSPI2Serial
C:\nburn\examples\mod5270\QSPI2Serial
-
- Posts: 622
- Joined: Mon May 12, 2008 10:55 am
Re: SPI Example
I don't have that particular subdirectory. But I do have a MOD5234 directory, and it was there. I was just looking for an spi directory off the examples directory like the other examples. Why bury some examples?
In any case, thanks for the help.
In any case, thanks for the help.
Re: SPI Example
Because they are specific to a particular platform.
-
- Posts: 622
- Joined: Mon May 12, 2008 10:55 am
Re: SPI Example
Where would I find the SPI API docs? I've looked through all the sub-directories of Nburn\docs, and opened all the library pdf files I can find, and not found them. They're probably right in front of me and I'm just blind?
Re: SPI Example
I don't think so, I couldn't find them either. But I did see some good comments in the \nburn\include\qspi.h file.
-
- Posts: 513
- Joined: Sat Apr 26, 2008 7:14 am
Re: SPI Example
See the related source for the 5234:
C:\nburn\MOD5234\system\qspi.cpp and qspiBsp.cpp
C:\nburn\MOD5234\system\qspi.cpp and qspiBsp.cpp
Re: SPI Example
One thing to watch is if you are using the SD card access in your design and SPI for your own hardware is that you need to modify the supplied QSPI code to add critical section access and init code each time you call the SPI otherwise you will have issues if you use SPI from different tasks.
I had to do this with a touch screen driver over SPI and I was using the SD card at the same time in the design. I would get corruption of the file system and it was traced to the SPI access in the touch screen driver. With some help from the support on this forum, I was able to add code to use a critical section to block access at the same time in different tasks.
Search the forum for this... If you can't find it let me know and I will dig it out for you?
Dave...
I had to do this with a touch screen driver over SPI and I was using the SD card at the same time in the design. I would get corruption of the file system and it was traced to the SPI access in the touch screen driver. With some help from the support on this forum, I was able to add code to use a critical section to block access at the same time in different tasks.
Search the forum for this... If you can't find it let me know and I will dig it out for you?
Dave...