Question
why can't I change the clock
I inherited someone else's code who knows more about the STM32L1 architecture than I. In some code paths, the HSI can get changed to 8Mhz from the HSE of 32Mhz, and sometimes it can't.
It fails because of this loop timing out.
do {
HSIStatus = RCC->CR & RCC_CR_HSIRDY;
} while ( (HSIStatus == 0) && ( HAL_GetTick() < timeout ) );What might be blocking the HSI from being ready? Any thoughts on what things I might enable or disable in order to get the HSI status to be ready all the time?