Hello, Im using CH583M as a peripheral and central device for scanning the air around and also for advertising with further connection in a server role. In parallel with this functionality, I have a set of functions for working with incoming custom requests from outside via UART1, for their decryption and for their parsing. And all this functionality is included in a separate custom TMOS event that is launched at the moment new data is received via UART1.
The problem is that at a completely random moment, when only scanning, advertising and parsing requests are working on the device, the device stops working and gets stuck inside the BLE stack at address 0x41de6 - 0x41d84. The problem is that the device does not even reboot, but remains smoking in these addresses until it is rebooted via power, although I have implemented a restart based on an interrupt. That is, apparently all my interrupts are disabled and then this freeze occurs.
I'm using version 2.1 of the BLE stack, the same thing happens on version 2.0. I tried all possible situations, nothing helps. The project was made on the basis of the official examples "central" and "peripheral". Freezing occurs quite rarely and the BLE connection has never been made during all this time. What could be the problem?