kvk
(Klaus Kragelund)
1
Hi
I have a board where I am using the STM32G051.
I have code running on the eval board. When I work in the target, I get a hard fault.
I think it is since I have not tied the BOOT0 pin down, and I am using SWCLK on the same pin (PA14).
In a google search this is mentioned:
I am using STM32cube IDE. Anyone know how to set the Option bytes to run from flash and ignore the BOOT0 pin?
Thanks
Klaus
1 Like
manny
(Manny Bains)
2
Section 2.5 references FLASH_SECR register
Take a look at section 3.7.21
manny
(Manny Bains)
3
if you’d like to use the HAL driver:
kvk
(Klaus Kragelund)
4
Many thanks for the help, Manny.
I eventually found that the hard fault was due to something else than the option bytes.
manny
(Manny Bains)
5
Hi Klaus,
What was it? RCC initialization issue?
Manny
kvk
(Klaus Kragelund)
6
Accessing a peripheral that did not exist, it seems. Downgraded the project to a smaller controller, and it worked (could also be a memory issue)