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

Efficient SPIM with periodical slave

Dear nRF52832 experts,

I have a SPI slave device which can periodically notify the MCU with data ready (DRDY) signal.  For each DRDY signal, we should perform a SPI transaction to read a sample of less than 30 bytes into RAM buffer. The process will repeat periodically (from 200Hz to 8Khz) when the slave device is in continuous collection status.

I am wondering if we can manage the DRDY and sample reading without troubling the CPU until the sample is in RAM? if it is possible, then can we further to notify CPU once only after N samples are in RAM? 

The raw idea I am thinking is to have below triggering chain: GPIOTE --> SPIM --> COUNTER --> CPU,  since I am very new to nRF52, I am still unsure if the chain is feasible? If yes how to set it up?

Best regards,

yf13

Parents Reply
  • Yes, any peripheral driver apart from the ones mentioned under "migration not possible" in the nrfx migration guide can be migrated to nrfx drivers. It is possible to mix legacy and nrfx drivers for separate peripherals.

    As far as I know, the value in the PTR register will be incremented during transfers, and this will not be reset to its original value by itself. If you were to start the transfer again, it would start in the last buffer of the array list and increment from this point. You will have to reset the buffer pointer in SW before starting a new transfer.

Children
Related