cancel
Showing results for 
Search instead for 
Did you mean: 

New project runs but chokes in debug

Brother Theo
Associate II

Hi, I created a project in MX Cube for a Nucleo 746XG board. I set up a timer as a periodic interrupt, and one gpio. I did nolt change anything in the clock section. The code toggles the gpio line.

This code runs fine, but when I go to debug it the SystemClock_Config function throws an error. I followed the traceback and its the HAL_RCC_OscConfig function in stm32f7xx_hal_rcc.c file that errors. Here is where the error occurs:

if (((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF) ||
          (READ_BIT(pll_config, RCC_PLLCFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) ||
          (READ_BIT(pll_config, RCC_PLLCFGR_PLLM) != RCC_OscInitStruct->PLL.PLLM) ||
          (READ_BIT(pll_config, RCC_PLLCFGR_PLLN) != (RCC_OscInitStruct->PLL.PLLN << RCC_PLLCFGR_PLLN_Pos)) ||
          (READ_BIT(pll_config, RCC_PLLCFGR_PLLP) != ((((RCC_OscInitStruct->PLL.PLLP) >> 1U) - 1U) << RCC_PLLCFGR_PLLP_Pos)) ||
          (READ_BIT(pll_config, RCC_PLLCFGR_PLLQ) != (RCC_OscInitStruct->PLL.PLLQ << RCC_PLLCFGR_PLLQ_Pos)))

It looks like the PLLSRC line that errors. Note that I did nothing to the clock settings. I have other projects on this board made the same way and work fine.

Any ideas?

2 REPLIES 2

Error says what?

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

no error message. In debug my breakpoint is not hit, co i pause it and and it s stuck in and endless loop at a disable irq function called by the error handler.