Skip to main content
VLitv.1
Associate
Jan 28, 2022 1:50 PM UTC
Solved

STM32H7 Code works with debugger; does not start without debugger

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.

This topic has been closed for replies.
VLitv.1
VLitv.1Best answer
Associate
Jan 31, 2022 12:28 PM UTC

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.

8 replies

Tesla DeLorean
Guru
Jan 28, 2022 2:00 PM UTC

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 Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
VLitv.1
VLitv.1Author
Associate
Jan 28, 2022 2:16 PM UTC

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
Jan 28, 2022 2:24 PM UTC

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 Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
VLitv.1
VLitv.1Author
Associate
Jan 28, 2022 2:30 PM UTC

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

Pavel A.
Jan 29, 2022 1:11 AM UTC

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
Jan 31, 2022 12:28 PM UTC

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
Nov 11, 2024 2:28 PM UTC

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
Nov 11, 2024 5:22 PM UTC

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 Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..