HSI48 on STM32F072C8T problem
- 14 replies
- 8620 views
Hello,
I have a problem with a clock configuration on my STM32F072C8T6. I need the 48MHz clock (HSI48) for the onboard USB communication. I have enabled this via ioc in the clock configuration. Everything looks fine there and no conflict is reported.
Now as soon as I load my program on the STM32, the debug connection breaks as soon as the following line is executed (in the automatically generated SystemClock_Config function --> see attachment) :
__HAL_RCC_HSI48_ENABLE(); (in the stm32f0xx_hal_rcc.c file)
I see that this line only writes the CR2 register with the following command:
RCC->CR2 |= RCC_CR2_HSI48ON;
Unfortunately I can't see which error handler the STM32 goes into, because the debug connection breaks. I have also tried to increase the FLASH latency with the following line, unfortunately without success:
FLASH->ACR |= 0x1;
If I run the program with the 8MHz everything works without problems.
Am I missing something? Can someone help me? Thanks a lot!

