cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7 Discovery kit with CUBEMX basic code stops on SystemClock_Config()

BJerk.1
Associate II

I have a STM32H7 Discovery kit with default setup exported, but the code stops in SystemClock_Config(). Debugger stops here:

 MODIFY_REG(RCC->CFGR, RCC_CFGR_SW, RCC_ClkInitStruct->SYSCLKSource) (in stm32h7xx_hal_rcc.c). Any ideas what might be a problem?

5 REPLIES 5

Would need to see structure settings.

Check HSE, HSI and PLL viability.​

Particular issues are LDO/SMPS and VOS settings.

Local/automatic variables should be fully cleared.​

Contrast with HAL examples for board.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Funny thing is, that I'm using default setup from CubeMX. I will check the HAL example to see what is the difference. Thanks.

berendi
Principal

There are a few STM32H7 based discovery boards, which one?

Yeah, I've been hearing about auto code generators replacing me for nearly 4 decades..​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

EDIT: Looks like it's a problem with SEGGER J-link. Sorry for that.

I'm using STM32H7B3I-DK.

The strange thing is that I left the problem for a day and with using the same code everything worked until I've played with DAC output.

The problem appears again. The debugger says:

T-bit of XPSR is 0 but should be 1. Changed to 1.

and then everything stops.

Not sure why it started working and even if I try code that worked before changing DAC output I get the same error.

Any ideas?