cancel
Showing results for 
Search instead for 
Did you mean: 

Why is my HSE crystal not working on NUCLEO-L433RC-P board ?

freeflyer
Senior II

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...

freeflyer_0-1764187994761.png

The board modifications are below:

- fitted X2

- fitted C47 and C48

- connected solder bridges SB67 and SB69

- disconnected solder bridges SB68 and SB70

freeflyer_2-1764188307709.png

 

freeflyer_1-1764188213990.png

 

PS.  This relates to my other post about I2S master clock speed...

 

https://community.st.com/t5/stm32-mcus-products/can-i-use-an-internal-rc-oscillator-to-achieve-an-i2s-master/m-p/859639#M289324

 

24 REPLIES 24

Thanks, I set MSI to 8MHz and was able to achieve 12.571Mhz for the I2S clock (just as I was trying to do with the 8MHz external crystal!)....

freeflyer_0-1764260065897.png

 

LCE
Principal II

What Andrew said, and I wonder why you mount 8 MHz in the first place when you know you need 12.288 MHz (I guess for 48k audio) ?

The PLL doesn't have the fraction stuff which I know from the H7s, so 8 MHz doesn't really help.

And for everything that doesn't like clock jitter, like audio and CAN, do not use HSI anyway.

Don't know the MSI mentioned by @gbm .

Good point I should be trying to fit a 12.888mhz crystal for 48khz audio.

but my system clock is currently running at 80mhz (now using MSI)

 

If I fit a 12.888MHz crystal then what would the system clock run at ?


@freeflyer wrote:

Good point I should be trying to fit a 12.888mhz crystal for 48khz audio.


I was suggesting an external oscillator rather than a crystal.

 


@freeflyer wrote:

If I fit a 12.888MHz crystal then what would the system clock run at ?


That will depend on what you do with the PLL and the various dividers ...

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
LCE
Principal II

12.288 MHz

Attention to detail is very important for electronics development!

;)

Check all other peripherals and interfaces if they need a specific clock which might not work with 12.288 MHz *x/y.

For PLL checking CubeMx is really great.