Nucleo-L4R5 is kept in reset after downloading sketch #1517
Replies: 25 comments 3 replies
|
Same behaviour on Windows and Linux (Xubuntu in VM) |
|
Hi @Pestimist |
|
Thank you @fpistm for this information |
|
Unfortunately not it is too specific to be added to generic upload method. |
|
too bad |
|
Well you can locally change the GenL4 upload line to add: -ob nBOOT0=0 -ob nBOOT0=1 Line 5089 in 6479b8a I did not add it as issue seems linked to STM32L4+ and do not want impact all the STM32L4. |
|
Thank you very much |
|
After successfully downloading the CheckVariant sketch via SWD the µC started to behave very erratically. First it was unreacheable, found out that Flash protection registers were changed. This happens regardless how I program the chip (Arduino IDE, Sloeber, STM32programmer, mass storage, SWD) |
|
Yes very strange. |
|
I wanted to add the L4P5 variant, did all the steps mentioned here but had no serial output after programming the CheckVariant sketch. |
|
So you tried to add the generic L4P5. If Serial does not work probably that generic SystemCoreConfig is not correct or ldscript as this is what is missing (and off course boards.txt entry addition) |
|
Yes, but now I also want to get the Nucleo-L4R5 back working, if that is possible. |
|
Well, hard to tell what is wrong. You can try to use the STM32CubeProgrammer and check options bytes. |
|
ST-Link firmware update did not change anything. |
|
You can share a screenshot of your OB then I will compare to mine. |
|
This seems to be when all works fine, trying to recreate the "not working" state |
|
side question: |
|
OB are the same when the MCU doesn't start and the red LED on the Nucleo board is lit |
|
I've the same. Issue come from Arduino IDE on Windows. Core is only source file.
I thought your board does not work anymore ? |
|
it is complicated... |
|
I would checked nBoot0 and nSWBoot0 by default. |
|
...now I finally understand that with "core" you aer NOT talking about the MCU core, but the stm32duino-core... With nBOOT0 and nSWBOOT0 checked and BFB2 unchecked it seems to work reliably (I compared OB with the ones from Nucleo-L4P5 I also have) |
|
Right in Arduino world core is defined like this: https://www.arduino.cc/en/guide/cores |
|
Hello, I'm not sure if my answer is still useful now, but: The flash is considered "empty" as long as first word @0x0800 0000 contains 0xFFFFFFFF. So if you take an empty device, write your binary then reset (using any tool), it will not execute your loaded code. It will execute System Bootloader till next power off/on reset. You can get rid of this behavior by forcing boot on Flash using Option bytes nBootSW=0, nBoot0=1, nBoot1=1. I hope it helps. |



Uh oh!
There was an error while loading. Please reload this page.
Hi,
I am experimenting with Nucleo-L4R5 and try to run the CheckVariant example sketch on it.
This sometime succeedes, but most of the time the µC gets stuck in Reset. The red LED is on. When trying to program it with STM32CubeProgramer I get the error "The core is kept under Reset!"
Doing a full chip erase and several resets is able to bring the µC back to normal operation but this just keeps happening very often.
I also tried downloading a simple "blink" example, same result.
When connecting the stuck board to STM32CubeProgrammer, fault analysis is executed and I get the message that DIV_0_TRP bit was enabled.
I suspect this is an error with stm32duino, not with the µC itself, thats why I am writing here.
All reactions