cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7 Code works with debugger; does not start without debugger

VLitv.1
Associate II

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.

1 ACCEPTED SOLUTION

Accepted Solutions
VLitv.1
Associate II

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.

View solution in original post

8 REPLIES 8

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
Up vote any posts that you find helpful, it shows what's working..
VLitv.1
Associate II

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.

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
Up vote any posts that you find helpful, it shows what's working..
VLitv.1
Associate II

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

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
Associate II

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.

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.

 

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