cancel
Showing results for 
Search instead for 
Did you mean: 

is this and example of STM32G0 core lockup during a software reset?

Tom MacDonald
Associate III

Using a STM32G0F06

I have a bootloader/application that I am debugging. I am facing a strange problem. Often, I command the app to drop to bootloader (via a software reset). When I execute the software reset code, occasionally the core locks up.

Here is a video showing the core registers and the disassembly as I step debug through the reset code:

https://youtu.be/8SxjNWpSIss

A couple of questions:

  • Is this a MCU core lockup?
    • If not, what is it?
  • Does the PC go to 0x1FFF19A6 during a core lockup, or is that just random?
  • How come the IWDG I have configured does not reset the MCU after it has locked up? Does it get locked up to?
  • Is there some way I can programmatically recover from a core lockup:
    • MCU pulls its' own external reset pin low?
1 ACCEPTED SOLUTION

Accepted Solutions
Tom MacDonald
Associate III

Actually, I just figured out why this behaviour was occurring. This is from the STM32G030F6 device errata sheet:


_legacyfs_online_stmicro_images_0693W00000bl4N6QAI.png 

I fixed it by:

  • Flashing the app I wanted to debug
  • disconnecting the debugger
  • power cycling the pcba
  • connecting the debugger (after app had already launched)
  • now I can reset/reflash etc. as expected

View solution in original post

3 REPLIES 3
gbm
Lead III

It's either the application was not flashed or unstable BOOT0 input - the bootloader is invoked instead of your application

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice
Tom MacDonald
Associate III

The problem is that I have the option bytes configured to not care about the BOOT0 input (see screenshot below). From my research it seems like this should be impossible?


_legacyfs_online_stmicro_images_0693W00000bl4DBQAY.png

Tom MacDonald
Associate III

Actually, I just figured out why this behaviour was occurring. This is from the STM32G030F6 device errata sheet:


_legacyfs_online_stmicro_images_0693W00000bl4N6QAI.png 

I fixed it by:

  • Flashing the app I wanted to debug
  • disconnecting the debugger
  • power cycling the pcba
  • connecting the debugger (after app had already launched)
  • now I can reset/reflash etc. as expected