Hello, In our LPC55S69 project , using Freertos, we are encountering random bugs in the .POWER_EnterPowerDown API function.
Versions used :
- arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 9-2019-q4-major) 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599]
- #define _NEWLIB_VERSION "3.1.0"
- FreeRTOS Kernel V10.3.0
- SDK 2.8, using hard ABI
At first, POWER_EnterPowerDown seems to work well. However, sometimes, the CPU gets stuck in the function without effectively going to power down (we know this because the CPU current alone is about 4mA).
- Given we don't have access to the source code, what can cause this function to crash, or to loop?
- Moreover, the debugger gets lost when this error happens, and we can find the following comment The HARD FAULT handler should execute from SRAM. (The Hard fault handler should initiate a full chip
reset) reset). When using the managed linker, in what section should we put the Hardfault handler? What is exactly the attribute we should add above the function declaration/definition? - I suppose any pending interrupt before calling the function will be problematic, is that right?
Thanks in advance for your answers,
Victor