Hi,
I am trying nrf52832 with pca10040 board. My app uses s112 soft device and also SPIM0 to collect data from a slave device. No event handler has been used when initializing SPIM0 with nrfx_spim_init(), I can use nrfx_spim_xfer() in blocking mode to provision the slave device smoothly.
Trouble comes when I want setup non-blocking repetitive SPIM xfer managed by PPI (triggered by slave DRDY event and counted by a counter). In the PPI setup routine, I can setup GPIOTE_IN, TIMER1 and two PPI channels smoothly, but I am not able to setup a SPIM xfer with HOLD | REPEAT | POST_RX_INC | NO_EVT_HANDLER flags using nrfx_spim_xfer() api.
The problem is the nrfx_spim_xfer() call always stuck and sometime with step by step debugging I can see log like "<error> app: SOFTDEVICE: ASSERTION FAILED" in debug terminal. I don't know how to reveal more information yet. To my knowledge, s112 device doesn't use SPIM0, though it uses TIMER0. I also tried to toggle the NRFX_SPIM_NRF52_ANOMALY_109_WORKAROUND_ENABLED in sdk_config.h but it doesn't help as well. So I left it disabled.
The above repetitive SPIM setting up routine runs in main context (priority 15).
If I comment out the line for the nrfx_spim_xfer() call, my app never stuck --- this tells the problem is with that API call.
My case is not like this one since I can use the same SPIM instance to provision the slave device correctly. That implies that my nrfx_spim_config_t is correct for my slave device.
Regards,
yf13