SPI Example

Discussion to talk about software related topics only.
Post Reply
SeeCwriter
Posts: 622
Joined: Mon May 12, 2008 10:55 am

SPI Example

Post by SeeCwriter »

There don't appear to be any SPI bus examples in the NB software package. Are there any available?
seulater
Posts: 445
Joined: Fri Apr 25, 2008 5:26 am

Re: SPI Example

Post by seulater »

have you looked here ?

C:\nburn\examples\mod5270\QSPI2Serial
SeeCwriter
Posts: 622
Joined: Mon May 12, 2008 10:55 am

Re: SPI Example

Post 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.
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: SPI Example

Post by rnixon »

Because they are specific to a particular platform.
SeeCwriter
Posts: 622
Joined: Mon May 12, 2008 10:55 am

Re: SPI Example

Post 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?
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: SPI Example

Post 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.
Ridgeglider
Posts: 513
Joined: Sat Apr 26, 2008 7:14 am

Re: SPI Example

Post by Ridgeglider »

See the related source for the 5234:
C:\nburn\MOD5234\system\qspi.cpp and qspiBsp.cpp
v8dave
Posts: 333
Joined: Thu Dec 31, 2009 8:31 pm

Re: SPI Example

Post 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...
Post Reply