We have what is a pretty common requirement for modern applications especially IOT.
Specifically, we need to, without code intervention - DMA only:
- read results from several SPI sensors
- interrupt (and possibly wake up sleeping) CPU after all the results are available in RAM
- the peripherals are 20-bit and 24-bit sensors (common for ADC and sensors like accelerometer, pressure, etc)
For each peripheral CS is asserted once, then 24 bits clocked in over SPI, and only after all data read CS de-asserted.
I was able to do this all with DMA+SPI on Kinetis K64F (DMA to sequence multiple CS toggling and multiple SPI xfers).
Successful products now shipping doing this on K64F ;-)
Now we're considering LPC55xxxx for next projects.
So, the question: Using DMA and flexcomm SPI, how does one accomplish this on LPC55xxx?
Flexcomm SPI documentation says:
'Data frames of 4 to 16 bits supported directly. Larger frames supported by software'
We need to read multiple 24-bit SPI devices before any interrupt. No multiple interrupts!
Only interrupt when all data read into RAM!
Thanks in advance for any pointers!
Best Regards, Dave