Dear ST staff, I am using the nucleo board STM32L476RG to flash a STM32L476ZGT6.
I once wrongly connected the SWD pins. I am now only able to erase the microcontroller flash: I cannot flash the microcontroller again.
Do you have a clue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-03-02 1:29 AM
Note:The hardware is still functional, I made sure of it.
- Labels:
-
DEBUG
-
ST-Link
-
STM32L4 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-03-02 2:01 AM
Can you connect to the target e.g. in STLink Utility?
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-03-02 2:11 AM
Hello Jan,
Thanks for your feedback.
I could connect to the target via ST Link:
11:09:56 : Connected via SWD.
11:09:56 : SWD Frequency = 4,0 MHz.
11:09:56 : Connection mode : Connect Under Reset.
11:09:56 : Debug in Low Power mode enabled
PF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-03-02 2:24 AM
Most people here are not ST staff.
> I could connect to the target via ST Link:
And what are the error messages when you try to flash ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-03-03 6:08 AM
Hello,
The problem came from specific backup registers that needed to be reset.
You can find below the SW excerpt related to the needed action:
HAL_Init();
HAL_DBGMCU_EnableDBGStandbyMode();
__HAL_RCC_BACKUPRESET_FORCE();
__HAL_RCC_BACKUPRESET_RELEASE();
Thank you all for your help,
PF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-03-03 6:25 AM
Strap the BOOT0 pin HIGH, connect, do a mass erase, and set option bytes to defaults.
Up vote any posts that you find helpful, it shows what's working..
