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

No Debug Output and stopped APP-Timer after usage of sd_ble_gap_disconnect

Hello,

I have a strange Problem. I have a Central Application where the Central will get a TagID via Uart and if there is a adv. from this Tag the Central will connect to the Tag.

While this connection the Central will read out some data and then the Central use the sd_ble_gap_disconnect command to disconnect from the Tag.

There is also the possibility that the Central will get a "Disconnect" command via Uart and also then the Central will use sd_ble_gap_disconnect to disconnect from the Tag.

To see if the Central is Alive the Central will send a Hearbeat message via Uart to the PC every second.

If I run the "Debug" Configuration everything went well without a problem.

But if I switch to the "Release" Configuration then I see the strange Problem.

If the central use the sd_ble_gap_disconnect alone after the central has read the data from the tag everything went well and also this uart hearteat is still send every second. Also I will see all debug outputs on the console.

But if I use the sd_ble_gap_disconnect after I have got the "Disconnect" command via Uart the central will disconnect from the Tag but I will no longer see any debug outputs on the console and also my uart heartbeat is no longer send. It looks like the used App timer is no longer working.

Bud because this happen within the Release Build I have not good chance to use the debugger to find this strange problem.

markus

Parents Reply
  • The app will not enter any error handler! And because of the Softdevice (I think) my application will enter the hard fould if I have stopped at a breakpoint and want to start again after the breakpoint. I also have tried to make a step by step debugging directly at the start of main. But there i can then see that no each line will be entered. So I think because of the optimizations within the release build the debugging is very difficult.

Children
Related