Nucleo-L4R5 is kept in reset after downloading sketch #1517
Replies: 25 comments 3 replies
-
Same behaviour on Windows and Linux (Xubuntu in VM) |
Beta Was this translation helpful? Give feedback.
-
Hi @Pestimist |
Beta Was this translation helpful? Give feedback.
-
Thank you @fpistm for this information |
Beta Was this translation helpful? Give feedback.
-
Unfortunately not it is too specific to be added to generic upload method. |
Beta Was this translation helpful? Give feedback.
-
too bad |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
Thank you very much |
Beta Was this translation helpful? Give feedback.
-
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) |
Beta Was this translation helpful? Give feedback.
-
Yes very strange. |
Beta Was this translation helpful? Give feedback.
-
I wanted to add the L4P5 variant, did all the steps mentioned here but had no serial output after programming the CheckVariant sketch. |
Beta Was this translation helpful? Give feedback.
-
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) |
Beta Was this translation helpful? Give feedback.
-
Yes, but now I also want to get the Nucleo-L4R5 back working, if that is possible. |
Beta Was this translation helpful? Give feedback.
-
Well, hard to tell what is wrong. You can try to use the STM32CubeProgrammer and check options bytes. |
Beta Was this translation helpful? Give feedback.
-
ST-Link firmware update did not change anything. |
Beta Was this translation helpful? Give feedback.
-
You can share a screenshot of your OB then I will compare to mine. |
Beta Was this translation helpful? Give feedback.
-
This seems to be when all works fine, trying to recreate the "not working" state |
Beta Was this translation helpful? Give feedback.
-
side question: |
Beta Was this translation helpful? Give feedback.
-
OB are the same when the MCU doesn't start and the red LED on the Nucleo board is lit |
Beta Was this translation helpful? Give feedback.
-
I've the same. Issue come from Arduino IDE on Windows. Core is only source file.
I thought your board does not work anymore ? |
Beta Was this translation helpful? Give feedback.
-
it is complicated... |
Beta Was this translation helpful? Give feedback.
-
I would checked nBoot0 and nSWBoot0 by default. |
Beta Was this translation helpful? Give feedback.
-
...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) |
Beta Was this translation helpful? Give feedback.
-
Right in Arduino world core is defined like this: https://www.arduino.cc/en/guide/cores |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
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.
Beta Was this translation helpful? Give feedback.
All reactions