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

Static variables are reset after BLE sending

Hello ! I have a problem with my program (on a nRF52 board) : when I send a value to the board via BLE, it seems that my static variables are reset.

I noticed that, because in my main, I have a state machine (with a switch case), and when I send a value via BLE (8 bits or 32 bits), the program doesn't return in the good state : it returns in the initialisation case.

Do you know how can I solve this problem please ?

Parents
  • Edit : In fact, it seems that the whole program is re-launched, because I tested mmy code with an other code, and after sending a value on the "static void led_write_handler" (8 bits), the program restarted from scratch, apparently (I saw it with the debugger).

Reply
  • Edit : In fact, it seems that the whole program is re-launched, because I tested mmy code with an other code, and after sending a value on the "static void led_write_handler" (8 bits), the program restarted from scratch, apparently (I saw it with the debugger).

Children
No Data