[riot-devel] [stm32l1] [lpm_arch] Hard Fault after wake-up
anon1644072 at gmail.com
Thu Aug 4 16:54:16 CEST 2016
I have started to introducing a support of Low Power Mode into current
STM32L1 code base and I faced a problem which is hard to resolve alone with
my current experience level at the RIOT.
Firstly, I have implemented some low power modes in corresponding
The code seems to be correct just because I took corresponding code pieces
from the SPL's stm32l1xx_pwr.c source file.
After that I created a small application to test:
1. Low Power Mode entrance
2. RTC wake-up by alarm
3. Measure actual power consumption
And there's a issue that I faced: after entering SLEEP mode and when MCU is
woken up by the RTC alarm the HardFault condition happens immediately and
no other instruction after _WFI() seems to be executed.
After HardFault thanks to DEVELHELP flag I can observe the HardFault
Context before hardfault:
> r0: 0x20000c04
> r1: 0x0000000a
> r2: 0xe000ed00
> r3: 0x00000010
> r12: 0x00000000
> lr: 0x08002027
> pc: 0x20000c04
> psr: 0x20000044
> CFSR: 0x00040000
> HFSR: 0x40000000
> DFSR: 0x00000000
> AFSR: 0x00000000
> EXC_RET: 0xfffffffd
> Attempting to reconstruct state for debugging...
> In GDB:
> set $pc=0x20000c04
> frame 0
> ISR stack overflowed by at least 80 bytes.
So the only idea that it gives is that I should inspect CFSR/HFSR registers
to see which condition leads to the HF.
I'm asking about any idea to resolve this issue: what to check first, which
conditions I should check before and after entering into the LPM, etc.
Any help and response is much appreciated!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the devel