Hello Renesas Team!
I've got a bit of a problem and I would like some advices about it.
I've been trying to implement SUOTA on a DA14531 smartbond Tiny embedded in a custom board. The problem I'm facing is the following :
When I debug my application as well as when I flash the RAM of the module using smart snippet, everything goes well, I can detect my BLE module, send it a SUOTA image, reboot on it, and the BLE is advertised again. A precision here is needed, to activate the BLE on the DA14531, I send an order from a STM32 via UART, which is interpreted by the Ble module, who then activates BLE and advertises its services.
However, when I program the flash of the module using a multi image generated by smart snippet studio, I can't activate the BLE anymore, even though I'm sending the exact same message. I was able to determine that the image in itself wasn't the problem, for when I override the test (testing if(true) instead of if("message received")) it works when I program the flash.
My question is the following : Is there anything that could disturb or otherwise disable the UART communication or something used for the BLE that would be ran when the board boots from a state without power versus when it boots from a SUOTA reboot ?
Hi Natael,As mentioned by PM_Renesas during sleep modes peripheral blocks (including UART) are switched off. With the debugger attached the device doesn't actually go to sleep so this could be a reason…
I requested the SUOTA images as I thought the actual issue was the SUOTA. It was my misunderstanding.
no said:Is there anything that could disturb or otherwise disable the UART communication or something used for the BLE that would be ran when the board boots from a state without power versus when it boots from a SUOTA reboot ?
Are you using extended sleep mode in your application? The reason I am asking is because during sleep all the peripheral blocks are off ( including UART).
Sorry for the misunderstanding!
I do use deep sleep indeed. I've done some debugging, and I've been able to locate the problem a bit more specifically. I've setup the second UART on some pins I didn't use until then to debug the code execution, and It seems the module keeps rebooting and getting stuck at some point. I'm still trying to figure out where exactly, but it is somewhere in system_init function, in arch_system file.
Other than that, it seems that the UART is behaving unexpectedly when not in debug. I send two characters by debug line to keep track of where in the code I am, and often I will only receive one of said character, then the board will be stuck, as the Transmit Holding Register is not emptied as it should be during a send. Are there more information you would need to try and figure out what this could be about ?
Hi Natael,As mentioned by PM_Renesas during sleep modes peripheral blocks (including UART) are switched off. With the debugger attached the device doesn't actually go to sleep so this could be a reason why you see different behaviour when running the example from flash and with the debugger attached. A test that you could perform is to disable sleep modes (extended and deep sleep) and see whether you are correctly receiving the UART characters and turning on BLE running from flash. If you can achieve this, this would indicate that the issue is related to the sleep mode, device is asleep when you are sending UART data and so it doesn't pick them up properly. If you want to use UART for reception of data and have the system in sleep you will need provision for waking up the system prior to receiving data. This can be handled in a number of ways, you can check the implementation of our software applications (Codeless and DSPS) as reference pointshttp://lpccs-docs.renesas.com/UM-140-DA145x-CodeLess/index.html http://lpccs-docs.renesas.com/UM-140-DA145x-CodeLess/howToUse.html#flow-control-and-sleep-modes https://www.renesas.com/eu/en/software-tool/serial-port-service-sps#document https://www.renesas.com/eu/en/document/mat/um-b-088-da145x-user-manual-dialog-serial-port-service?language=en&r=1600786 Please let us know with the results of your testing and any further questions.Best regards,AA_Renesas