I am trying to configure a project in a STM32F769I-DISC1 board using TIM6, DAC1, the FMC connected to the external SDRAM and the DMA (to pass data between SDRAM and DAC).
I have generated the configuration using STM32CubeMX, everything compiles OK but when running the code the firmware is throwing me an error from the HSI configuration function.
The error comes from this line:
/* Check if HSI is used as system clock or as PLL source when PLL is selected as system clock */
if((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_HSI)
|| ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_STATUS_PLLCLK) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSI)))
/* When HSI is used as system clock it will not disabled */
if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET) && (RCC_OscInitStruct->HSIState != RCC_HSI_ON))
/* Otherwise, just the calibration is allowed */
/* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/
It returns the HAL_ERROR here.
In STM32CubeMX I configured the RCC to work with the HSE from the board (25 MHz) so I don't understand why is the firmware having an issue with the HSI.
I have attached also the RCC configuration in STM32CubeMX.
Any clue to fix this?
Thanks in advanced,