Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Stm32L4: No reset exception catch after wakeup
#1
Hello,
I have a battery powered project and want to test it with connected debugger. 
The system goes to state "shutdown" and exits it by RTC every15s.
Exit means: "A power-on reset occurs when exiting from Shutdown mode."

Here my issue is, that EB halts after exit of shutdown at the reset vector and I need to press "F5" to continue.
I tried several debugger settings, like "don't stop at valid source info", "don't reset", "don't load app" and "don't run to main".
But no effect. It always halts.

What can I do ?
Is it possible to "hot plug" ?
Reply
#2
You have 2 options:

1) Use eblink with the fault unwind level 0 (fu=0). You can do this inside Embitz  debug interface settings.

2) Disable the reset vector catch in EBlink ( fc=mcsbih)


Code:
Usage -T cortex-m[,options]

    fu=<0..2>    : Fault unwind level; 0=off, 1=passive, 2=active(default)
    fc=<rmncsbih>: Fault catch active; rESET,mEM,nCOP,cHK,sTAT,bUS,iNT,hARD (default all)
    reset[=0..2] : Reset the target; 0=system(default),1=core,2=jtag
    halt         : Halt target
    resume       : Resume target

    e.g.  -T cortex-m,fu=1
          -T cortex-m,reset,resume
Reply
#3
Hi,
where it the right location to put this commands ?

I tried several things. But I wasn't successfull. It always halts at reset vector.

Additional, when I continue, I get instant error resulting in target expection and UsageFault_Handler. I assume it is something with the watchdog, which is stopped during shutdown (programmed in STM32L4 options bytes), continues after wakeup and run out while waiting in the reset vector breakpoint.

See attached image


Attached Files Thumbnail(s)
   
Reply
#4
I checked and can confirm, that this target exception only happens in case of watchdog is active. When wdg is inactive, I don't have this. I can continue normally after wakeup.
Reply
#5
Embitz debug interface settings.
Change the Fault unwind to off (0) and use the latest EBlink version from github.

The -fc is an EBlink cli option. You can currently only use it if you start EBlink as standalone with the right parameters.


   
Reply
#6
Hello, thank you. It worked for me with v2.63.
Before, I used v2.62, where it stopped after wakeup. Both times I used the same settings.

I not understand the connection for the above mentioned command line arguments and the "Fault unwind"-Box in the debugger interface dialog.
First I thought, I need to insert this command line arguments somewhere, but in the end, I changed only the "Fault unwind"-Box.
Reply
#7
Cortex-m has several exception flags which once triggered will cause EBlink doing a halt with stack unwind to show where the error is.

By default all the flags are enabled. With the -fc option you can enable individual exception flags for fault unwind (fu).

Fault unwind can be switched off, passive on target halt or actively stop on exception. This is the EBlink -fu option.

The fc option is not yet available in the Embitz debug interface settings.
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)