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

Application crash after disconnection

Hi,

I have an application with an accelerometer. This one communicate in I2C (TWI ). The accelerometer send a "data ready" signal every 20ms. I'm using the GPIOTE module to detect this signal and read the acceleration (I2C).

Each time I disconnect the Bluetooth, my application crash. I don't have any information to help me to debug on my app_error_handler. When this error happens, the execution stop at "Unknown funtion 0x000006B0".

  1. I tried to disable data ready interuption on the accelerometer and the error disappear (seems to be related to a priority issue with GPIOTE / TWI and SoftDevice).
  2. I thought that this issue was realated to a timing issue due to the GPIOTE interuption and TWI read during advertising start so I tried to disable GPIOTE on the data ready input when I have a disconnection event but that doesn't solve the problem.

I already saw another topic about that but the fix is not clear and I don't understand the root cause (devzone.nordicsemi.com/.../).

What I have understood from this topic is that I should use the ble_debug_assert_handler but I don't understand how to link this one with the app_error_handler. Do you have any example?

Any idea to help me to solve this issue? I'm on it since a while ...

Thanks

Parents
    1. Yes I'm using S130 V2.0.1 which is in the SDK bundle (12.3).
    2. I'm getting the message in debugger mode from Segger Embedded studio. When I disconnect the bluetooth, the execution is stopped with select active call frame "unknown function at 0x000006B0". In the call stack, the last called address is 0x000006B0. I tried a lot of things since yersterday but nothing to do... Still the same issue when I disconnect (and start again the advertising). If I don't start the advertising again, no problem.

    Is that helpful if I create a case with my code?

    GPIOTE is in low accuracy. TWI IRQ priority low.

Reply
    1. Yes I'm using S130 V2.0.1 which is in the SDK bundle (12.3).
    2. I'm getting the message in debugger mode from Segger Embedded studio. When I disconnect the bluetooth, the execution is stopped with select active call frame "unknown function at 0x000006B0". In the call stack, the last called address is 0x000006B0. I tried a lot of things since yersterday but nothing to do... Still the same issue when I disconnect (and start again the advertising). If I don't start the advertising again, no problem.

    Is that helpful if I create a case with my code?

    GPIOTE is in low accuracy. TWI IRQ priority low.

Children
No Data
Related