Page 1 of 1

SPI Example

Posted: Thu Oct 07, 2010 2:59 pm
by SeeCwriter
There don't appear to be any SPI bus examples in the NB software package. Are there any available?

Re: SPI Example

Posted: Thu Oct 07, 2010 3:01 pm
by seulater
have you looked here ?

C:\nburn\examples\mod5270\QSPI2Serial

Re: SPI Example

Posted: Thu Oct 07, 2010 3:19 pm
by SeeCwriter
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.

Re: SPI Example

Posted: Thu Oct 07, 2010 3:26 pm
by rnixon
Because they are specific to a particular platform.

Re: SPI Example

Posted: Thu Oct 07, 2010 4:30 pm
by SeeCwriter
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

Posted: Thu Oct 07, 2010 4:37 pm
by rnixon
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.

Re: SPI Example

Posted: Thu Oct 07, 2010 6:43 pm
by Ridgeglider
See the related source for the 5234:
C:\nburn\MOD5234\system\qspi.cpp and qspiBsp.cpp

Re: SPI Example

Posted: Sat Oct 09, 2010 9:43 am
by v8dave
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...