Closed popons closed 2 years ago
Hi @popons,
As you are using a custom board, would you mind checking that pin BOOT0
is connected to the GND
? In case, it is, would you please ensure you application is not modifying the MEM_MODE
field of the SYSCFG_MEMRMP
register?
If both checks are OK, then maybe you wanted to relocate the vector table without defining USER_VECT_TAB_ADDRESS
whether at IDE- or Makefile-level.
As for what you are observing, not setting the SCB->VOTR
register is not likely to be the root-cause. Indeed:
SCB->VOTR
register after a re-boot is 0x00000000.g_pfnVectors
).Since address 0x08000000 is by default aliased 0x00000000, access to the vector table will be correctly performed in case of interrupt. This is very likely to be the case as, on the screenshot above, both SysTick
and HardFault
exceptions are recognized. This would not have been the case in case of an incorrect access to the vector table.
I hope this helps. Waiting for you reply to know how things have progressed.
With regards,
Thank you for your reply. I checked and BOOT0 was in OPEN state. I shorted it to GND and it booted normally. Thank you for your time responding to my inquiries.
Hi @popons,
Glad to know you could solve this point. Please allow me to close this issue in this case.
With regards,
Caution In v1.10.3, SCB->VTOR is not set by default and remains at 0x00000000. Nevertheless, g_pfnVectors will be placed at 0x08000000. So if you run the default project in STM32CubeIDE, you will get a HardFault from SysTick Exception.
Describe the set-up
Describe the bug In the project's default configuration, USER_VECT_TAB_ADDRESS is not defined and VTOR remains at 0x00000000, resulting in a HardFault. Is this intended?
How To Reproduce
Open STM32CubeIDE 1.6.1(or 1.7.0)
Create New STM32 Project
Select STM32L151CB-A
Select V1.10.3 Firmware
Build and Program and Run
Additional context
Screenshots![image](https://user-images.githubusercontent.com/161728/136063374-2d427738-673f-4b35-bf25-8f4aa6f88c12.png)