This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

high data rate communication with SPI ADC

Hello.
We have product based on NRF51822 chip. 24 bit 4 channel ADC connected through SPI to MCU. Data rate is 250 Hz (4 ms). We send two ADC samples evry notification packet. In first realysation ADC was SPI slave, MCU was SPI Master. ADC generate DATA READY event on pin, MCU in interrupt initiate data transfer. Becouse MCU can be busy in SoftDevice routins for 6 ms, some samples were missing.
With some effort i made programm in which ADC and MCU were SPI Slave and SCK and CS were genereted by PWM (using gpiote and PPI).
But now we are developing new product with 6 channel ADC and data rate 1000 Hz. We no need send all data by BLE, but we can not miss any samles. Is it possible to solve this problem using a NRF52 mcu without using the described tweaks?

Parents Reply
  • If you have a long enough EasyDMA array list, you should never be blocked long enough to fill the whole set of buffers you have set aside for this.

    When you update the buffer pointer in the interrupt handler from an END event, there may still be an ongoing transfer that has been started (for instance by short between END and START task, or by GPIOTE/PPI from ADC interrupt), but due to the double buffering support, the ongoing transfer will not be discarded when updating the pointers, you will just get a later END event with information about this ongoing before the new buffers are used.

    According to this post, the pointers are actually updated by the EasyDMA, allowing you to read it out to see how much of the available buffers have been utilized.

Children
Related