Closed
Description
Description of defect
Priority: Blocker
Compiling device management client example for Nucleo F429ZI with debug profile and GCC_ARM compiler will reliably result in crash.
++ MbedOS Fault Handler ++
FaultType: HardFault
Context:
R0 : 00000000
R1 : 00000001
R2 : E000ED00
R3 : 08084F5F
R4 : 00000000
R5 : 00000000
R6 : 00000000
R7 : 00000000
R8 : 00000000
R9 : 00000000
R10 : 00000000
R11 : 00000000
R12 : 00000000
SP : 20012F68
LR : 0808D2DF
PC : 0808D2E0
xPSR : 61000000
PSP : 20012F48
MSP : 2002FFC0
CPUID: 410FC241
HFSR : 40000000
MMFSR: 00000000
BFSR : 00000000
UFSR : 00000008
DFSR : 00000000
AFSR : 00000000
Mode : Thread
Priv : Privileged
Stack: PSP
-- MbedOS Fault Handler --
++ MbedOS Error Info ++
Error Status: 0x80FF013D Code: 317 Module: 255
Error Message: Fault exception
Location: 0x808D2E0
Error Value: 0x200001B0
Current Thread: rtx_idle Id: 0x200129C8 Entry: 0x8085E7D StackSize: 0x280 StackMem: 0x20012D10 SP: 0x20012F68
For more info, visit: https://mbed.com/s/error?error=0x80FF013D&tgt=NUCLEO_F429ZI
-- MbedOS Error Info --
Two workarounds allow the target to bootup correctly:
Disabling sleep in hal_code:
diff --git a/targets/TARGET_STM/TARGET_STM32F4/device/stm32f4xx_hal_pwr.c b/targets/TARGET_STM/TARGET_STM32F4/device/stm32f4xx_hal_pwr.c
index dffb78e25c..e699fd9fff 100644
--- a/targets/TARGET_STM/TARGET_STM32F4/device/stm32f4xx_hal_pwr.c
+++ b/targets/TARGET_STM/TARGET_STM32F4/device/stm32f4xx_hal_pwr.c
@@ -391,7 +391,7 @@ void HAL_PWR_EnterSLEEPMode(uint32_t Regulator, uint8_t SLEEPEntry)
if(SLEEPEntry == PWR_SLEEPENTRY_WFI)
{
/* Request Wait For Interrupt */
- __WFI();
+ __NOP();
}
else
{
or changing the flash cache at application start in beginning of main.
FLASH->ACR = 0x405;
FLASH->ACR = 0xC05;
or
FLASH->ACR = 0x405;
FLASH->ACR = 0x705;
Target(s) affected by this defect ?
Nucleo F429ZI
tested with both LWIP and WISUN configurations.
Toolchain(s) (name and version) displaying this defect ?
gcc-arm-none-eabi-9-2019-q4-major
This does not reproduce with ARMC6 compiler.
What version of Mbed-os are you using (tag or sha) ?
Mbed OS 5.15.0
What version(s) of tools are you using. List all that apply (E.g. mbed-cli)
Mbed CLI 1.10.2
How is this defect reproduced ?
mbed import https://github.com/armmbed/mbed-cloud-client-example (4.2.1 version with Mbed OS 5.15.0).
mbed compile -m NUCLEO_F429ZI --profile debug
Crashes immediately on application start.
Also originally verified with internal test-tool which failed the same way.