Hello, I will try to explain this as good as I can. I am developing a project consisting a few sensors and also a HM-10 copy. After the code started growing, I encounteried a problem. The code works fine when powering the board, after about 4 minutes , the behaviour changes. I will try to explain what I observed:
I start sending data from the sensor continously. The program works without any problem for 3,4 minutes, after this time the MCU does not respond to any command sent through bluetooth and it stops sending data. The MCU does not restart only hangs-up.
What is interesting is that no interrupt works anymore ( ex: an interrupt is generated when the phone is connected to the bluetooth module). The program is made as a state machine, the MCU is able to switch to the other state. For example I have 2 states ACTIVE and SLEEP, if no BLE connection is up for 1 minute it enters in sleep mode. After hanging up the MCU enters sleep mode but no interrupt can wake him up anymore. Usually when it is working as soon as I connect the phone to the module, it exits sleep mode.