-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
Description
I tried to update to the latest master this morning and was immediately greeted by a HardFault
. I haven't had any of these recently so I'm almost sure it is because of an mbed-os change.
At present I believe it is STM32L4: Fix sleep implementation #7813 that is causing the problem.
Here's the actual fault report although I'm not sure it helps. The thread is the idle thread.
++ MbedOS Fault Handler ++
FaultType: HardFault
Context:
R0 : 4D11B537
R1 : 40000000
R2 : 00000004
R3 : 00000000
R4 : 00004000
R5 : 40021000
R6 : 10000000
R7 : 00000000
R8 : 00000000
R9 : 00000000
R10 : 00000000
R11 : 00000000
R12 : 007F7F7F
SP : 20004BF8
LR : 08014D2B
PC : 08014D2E
xPSR : 01000000
PSP : 20004BD8
MSP : 2000FFC0
CPUID: 410FC241
HFSR : 40000000
MMFSR: 00000000
BFSR : 00000082
UFSR : 00000000
DFSR : 00000000
AFSR : 00000000
BFAR : 4D11B56F
Mode : Thread
Priv : Privileged
Stack: PSP
-- MbedOS Fault Handler --
++ MbedOS Error Info ++
Error Status: 0x80FF013D Code: 317 Module: 255
Error Message: Fault exception
Location: 0x8010AEB
Error Value: 0x8014D2E
Current Thread: Id: 0x2000473C Entry: 0x8010CED StackSize: 0x200 StackMem: 0x20004A80 SP: 0x2000FF58
For more info, visit: https://armmbed.github.io/mbedos-error/?error=0x80FF013D
-- MbedOS Error Info --
Of course the hard fault is not completely repeatable, it doesn't always happen, it can happen at different points in the application. Although, I believe if it is going to happen the app doesn't run for long.
I created a branch from #6f338f8 and didn't see the hard fault after a few attempts. I appreciate this is not proof that this version is OK.
I also created a branch from #232543a and I saw the hard fault after a few resets. I agree this change looks good but I'm almost certain something is going wrong!
We're not doing anything with the run mode in our app. I.e. we should only be in the sleep and deepsleep modes selected by mbed-os.
I'm not sure if it is relevant but I'm using the LPTICKER in RTC mode; I might try switching to LPTIM to see if that makes the hard fault go away.
I've tried a few other things like increasing the idle thread stack size but didn't find anything that helped.
Issue request type
[ ] Question
[ ] Enhancement
[X] Bug