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

DMA for SPI master

I'm reading AD-converter data usin nRF51822 SPI-Master. BLE-stack is active so I can't use interrupts with SPI. I get data every 2 ms. Sometimes Events are delayed so long that I get erroneous data from AD.

Is there some way to implement DMA for the SPI-Master, maybe using SPI-slave some way?

Juha Okkonen

Parents
  • Hi Audun,

    Could you please elaborate on how to synchronize radio activity with the AD reading to achieve 500Hz reading?

    I'm in the same situation as Juha that the AD interupts every 2/4/8 milliseconds. And unfortunately, the AD conversion data has to be read out before the next interrupt comes.

    Thanks, Bruce

  • Thanks Audun. I was just doing something similar to what you suggested. I'm toggling a debug GPIO in AD's interrupt GPIOTE interrupt handler. However, from the debug GPIO captured by oscilloscope, I'm missing some interrupts if I turn on advertisement or if I'm in a connection.

    One thing puzzles me is the GPIOTE interrupt is not skewed, but some of them are missing completely. I would imagine in this case a lower stack interrupt pushes GPIOTE interrupt, but not making it disappear.

    Any thought on that?

    Thanks, Bruce

Reply
  • Thanks Audun. I was just doing something similar to what you suggested. I'm toggling a debug GPIO in AD's interrupt GPIOTE interrupt handler. However, from the debug GPIO captured by oscilloscope, I'm missing some interrupts if I turn on advertisement or if I'm in a connection.

    One thing puzzles me is the GPIOTE interrupt is not skewed, but some of them are missing completely. I would imagine in this case a lower stack interrupt pushes GPIOTE interrupt, but not making it disappear.

    Any thought on that?

    Thanks, Bruce

Children
No Data
Related