2025-11-26 12:22 PM
I have fitted an 8MHz crystal with 8.2pF capacitors to the NUCLEO-L433RC-P development board, but it is not working.
The software goes to an error handler when configuring the clocks, becuase of a time out iduring the function HAL_RCC_OscConfig (wait till HSE is ready)...
/* Set the new HSE configuration ---------------------------------------*/
__HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState);
/* Check the HSE State */
if(RCC_OscInitStruct->HSEState != RCC_HSE_OFF)
{
/* Get Start Tick*/
tickstart = HAL_GetTick();
/* Wait till HSE is ready */
while(READ_BIT(RCC->CR, RCC_CR_HSERDY) == 0U)
{
if((HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE)
{
return HAL_TIMEOUT;
}
}
}
The part numbers for the crystal and capacitors are below...
Crystal: CG04874-8M
https://www.ndk.com/en/products/upload/lineup/pdf/NDKX03-00009_en.pdf
Capacitors: KGM05ACG1H8R2CH
https://datasheets.kyocera-avx.com/C0GNP0-KGM.pdf
The clock configuration is below...
The board modifications are below:
- fitted X2
- fitted C47 and C48
- connected solder bridges SB67 and SB69
- disconnected solder bridges SB68 and SB70
PS. This relates to my other post about I2S master clock speed...
2025-11-26 12:45 PM
Dear @freeflyer ,
my 2 cents checks :
1) be sure at software level that HSE is enabled and not in bypass mode
2) even not recommended, check using an oscilloscope probe Osc_out pin , you can check it at the solder bridge . Not touch the Osc_in pin
3) remove the software timeout from the function HAL ( just for test ) as should using the HSI at 16MHz , when doing this switch to HSE for PLL after .
let us know
STOne-32