2022-12-09 08:52 AM
Hi,
We received a custom board built around a STM32L476 MCU. I could program it with a basic "Hello World" program which aims at blinking some leds.
But the leds do not blink... :(
using debugger, I noticed 2 strange behaviors
1) call to HAL_Delay() makes the firmware hangs
2) at the beginning of the execution, the debugger displayes the following message: "Break at address "0x1fff51f4" with no debug information available, or outside program code"
Googling for 1st message does not really help me to solve it..
I then googled for the 2nd message. I read lots of post/discussion about this topic. I finally ended that the BOOT0 pin is tied to VddIO and nBOOT1 is checked so according to STM3éL476 DS, "System memory is selected as boot space"
I could program the STM32L476 using the jtag/SWD connector we have on the custom board.
I do have 3 questions then:
1) if i got it correclty, the bootloader is started and tries to execute or read a value somewhere.. the end is that it results in a break at address "0x1fff51f4".. So why, can I, when using the debugger,execute a small part of my program?
2) is there anyway to force the bootloader to execute the program stored in the flash even if the one has not been uploaded using the bootloader ?
3) is there any chance that the bug 1 (HAL_delay makes the fw hangs) is caused by the fact that the fact tha the program has not been uploaded using the bootloader and is then not correclty/fully loaded ??
thanks for any feedback
Vincent
2022-12-09 09:14 AM
The debugger can change the PC to any address it wants, and execute any code within the processors address space.
In a power it up and run it sense, you can't
Could be that you're not setting up SCB->VTOR properly to point at your vector table rather than the one mapped at the zero address space.
2022-12-09 11:43 AM
Custom board BOOT0 pin High ? Cut and set it Low.
HAL_Delay is based on selected MX config. IRQ and tims must work...
2022-12-12 02:46 AM
Hi guys,
connecting BOOT0 to GND solves all my issues..
Thx for your help
Vincent