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

Softdevice uses CPU resources for hardware based events (PPI w/out IRQs...) - why?

NRF52840 - SDK 15.0 + Some register based custom functions.  S140, 6.0.0.

In order to work around some of the hardware limitations with SPIM in the context of a project, we've built a solution that uses PPI to drive a chain of peripherals. 
In a non-softdevice application it works flawlessly - only using CPU after a number of data transfers have been executed. 

In the Image below we have 8 groups of 16 individual chip selects, all driven via PPI - at the end of the 8th transfer an actual IRQ is issued, a software flag is set and we block process all of the data. The top line is the SPI CS toggling, and the bottom is CPU active low  - it's pretty clear the CPU is only active during the IRQ and block processing.

SoftDevice Off

Once SoftDevice is enabled, we appear to see "responses" to every single event generated, even though none of the peripherals used in the PPI chain have hardware IRQs enabled - is this expected / normal? If so, why?

Softdevice ON

Parents
  • Hi,

    Just having the SoftDevice present should not cause any additional CPU activity. And even if it is enabled, but not advertising, scanning or in a connection, you should not see any frequent regular CPU usage (you could see LFRC calibration every few seconds depending on configuration, but that's all). Can you describe all changes you have done between the two tests? What is the difference in your code?

Reply
  • Hi,

    Just having the SoftDevice present should not cause any additional CPU activity. And even if it is enabled, but not advertising, scanning or in a connection, you should not see any frequent regular CPU usage (you could see LFRC calibration every few seconds depending on configuration, but that's all). Can you describe all changes you have done between the two tests? What is the difference in your code?

Children
Related