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

PPI + SPI + Timer.

Hi guys. I'm fairly new at embedded development and I'm basically trying to set up a workflow that goes like this:

  1. Toggle a GPIO high - low, with a duty cycle of ~500 nS.
  2. Enable the SPI peripheral
  3. Get 16 bits
  4. Disable the SPI peripheral
  5. Sleep until next event.

The frequency of these events should be 16 kHz. So basically I'd need to get 16 kSamples @ 16bit / sample. With the added complexity of a softdevice peripheral. I'd like to keep the interrupts at a minimum.

Should I use PPI or a PWM library? I'd really like to keep the CPU intervention to a minimum, as to burn as little power as humanly [microcontrollerly] possible.

Related