2022-04-09 02:46 PM
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?
2022-04-09 02:57 PM
Error says what?
2022-04-09 03:26 PM
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.