Skip to main content
VLitv.1
Associate
January 28, 2022
Solved

STM32H7 Code works with debugger; does not start without debugger

  • January 28, 2022
  • 4 replies
  • 2668 views

I am using STM32H743VIT6 revision V.

The processor is configured using the latest version of CubeMX.

The program works with a debugger, but does not start without a debugger.

I don't understand what I'm doing wrong. Help me please.

Best answer by VLitv.1

Thanks to everyone who tried to help. The problem was created by CubeMX. The line /* #define USER_VECT_TAB_ADDRESS */ was commented out in the system_stm32h7xx.c file.

4 replies

Tesla DeLorean
Guru
January 28, 2022

Make sure BOOT0 is strapped LOW​

It resets / power cycles so option bytes and blank checks don't remain latched.​

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
VLitv.1
VLitv.1Author
Associate
January 28, 2022

BOOT0 is tied to LOW. I have two Chinese DevEBox STM32H7xx boards. These boards had flashing LED factory firmware. By pressing the reset button or power, I can restart the program. I installed my similar firmware on one of the boards. Everything works in debug mode. I press the reset button or reset the power and the firmware does not start. CubeProg writes The Core is Halted.

Tesla DeLorean
Guru
January 28, 2022

Then perhaps it is a coding issue with respect to LDO, SMPS or VOS settings.

One with Option Bytes​.

Or the location or content of your Vectors​.

Need to be at 0x08000000, and be valid, and match OB settings.​

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
VLitv.1
VLitv.1Author
Associate
January 28, 2022

I can e-mail this little project for analysis if possible.

Pavel A.
Super User
January 29, 2022

Check the option bytes that define the vectors address for BOOT0 high and low.

Make sure that your initial stack pointer in vectors[0] is correct.

VLitv.1
VLitv.1AuthorBest answer
Associate
January 31, 2022

Thanks to everyone who tried to help. The problem was created by CubeMX. The line /* #define USER_VECT_TAB_ADDRESS */ was commented out in the system_stm32h7xx.c file.

Associate III
November 11, 2024

dear sir

so we should add #define USER_VECT_TAB_ADDRESS to system_stm32h7xx.c, i understand that, is it correct????, if not, pls help share me correct solution.

 

Tesla DeLorean
Guru
November 11, 2024

Or

extern uint32_t g_pfnVectors[2];
SCB->VTOR = (uint32_t)&g_pfnVectors[0]; // Where you built it
Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..