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

SPI when advertising not working

Hi 

I am using SPI to talk to an LIS2DH with an NRF51822. I have merged the SPI Master example with the ble_app_rscs example and as soon as the ble advertising begins, my SPI interrupts no longer work and I end up in the hard fault. I have changed the IRQ priority to high but it still does not work. 

I am using SDK8.0.0 - I know it's old, it's the only SDK version I could get to work with the free version of Keil. 

Parents Reply
  • When softdevice is running,  you cannot debug.  You can breakpoint only.  Then it will crash if you try to step.  You need to restart every time you break.  With softdevice, you cannot hold the processor too long so the SPI init and data reading has to be done quickly.  Calling SD function within interrupt also not permitted.  Hence require to use App Scheduler.  When you hold the process too long, SD will crash.  This mean you SPI init and read data are taking too long to complete.

Children
Related