I'm running s120 v1.2 & SDK 9 My application will connect to, up to 8, known peripherals. If the connection is dropped or not established, my central app will try to continue to try to establish a connection. To the peripherals that do connect, my will start to write a small amount of data.
I use the call: sd_ble_gap_connect(), if this returns an error I call sd_ble_gap_connect_cancel(), and try to connect to the next peripheral. After trying to connect to all the peripherals, I cycle back and retry the devices that did not connect. I repeat this until all devices are connected. I try connecting to a new device every 100 ms.
To the devices that I have connected to, I write 1 byte (with no response) every 300 ms to 2 seconds, using sd_ble_gattc_write().
If I have a peripheral, that dosen't connect, I usually end up getting a Hardfault. Using the suggestions from this post. I think the fault is generated from SOFTDEVICE_EVT_IRQHandler().
If all devices connect the hardfault is very rare, but can still occur.
My question is, because both sd_ble_gattc_write() & sd_ble_gap_connect() are calls to the stack, can a new SOFTDEVICE_EVT_IRQ, occur while the handler is servicing a previous SOFTDEVICE_EVT_IRQ? If so, would this cause the ARM M0 in the nRF51 to hard fault?
Thanks.