2015-10-15 08:00 AM
2015-10-15 10:30 AM
The latter should specify LSE
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_LSE;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE; // Mandatory, otherwise the PLL is reconfigured! RCC_OscInitStruct.LSEState = RCC_LSE_ON; // External 768 kHz clock on OSC_IN/OSC_OUT if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) { error(''RTC error: LSE clock initialization failed.''); }2015-10-15 10:37 AM
Having battled with the PLLs before, the fail through behaviour on the SPL can also give headaches, I've added code to use the HSI/PLL when the HSE/PLL don't start. The thing to watch is that the SDIO/CRYPT/HASH/USB are dependent on the Q Tap of the PLL, if the PLL isn't running, because the HSE didn't start, none of these work as expected.
Having the board, or test suite, test the external oscillators and flag failures can be helpful in manufacturing, oscillators are prone to tomb-stone, or get knocked2015-10-15 10:55 AM