- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to hook up an SPI device but am confused about which SPI interface to use. I am using 3.1.2 SDK with the WCD4_EVB.
The only one defined in platform.h/c is SPI1, but this seems to be used by the flash driver. I found some forum discussions that seemed to suggest multiple SPI devices are not feasible as of now.
Can someone please help with the following questions?
1. If I use SPI1 (albeit with a different chip select pin than flash), will this work without any changes to the platform files?
2. Is there any other SPI interface I can use? I saw references to SPI3 in platform.h but nothing is defined in platform files
3. What exactly is the flash code used for? Does it even make sense for me to think of sacrificing flash support to get my SPI device working?
Thanks in advance!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes , eventhough you're using different CS pin, you might have to do that, Are SPI APIs thread safe ?
ie; locking & unlocking using a mutex, Since you're sharing a resource you must do that.
Also ,if you're using SPI1 for multiple peripherals, the SPI modes, Clock frequency used by these modules will be different and you might have to init the SPI for each specific peripheral before doing it's corresponding SPI operation.