cancel
Showing results for 
Search instead for 
Did you mean: 

CAN working on when using internal clock source but not externale clock source?

Oli98
Associate II

Hi there,

When setting up my CAN bus using the cube mx generator tool, I found that switching from using an external clock source for my CAN peripheral to the intrenal one (HSI48) to be exact my CAN comms began to work.

Im not sure as to why this is possible as I though th extenal crystal were more accurate than the internal ones?

Any help shedding light on the situation would be greatly appreciated!

17 REPLIES 17

Do you soldering the External Crystal on that board already?
there is no high speed crystal on that board, isn't it?

Oli98_1-1701772552407.png

I tested like this and it still didnt work?

the other stuff is that you had soldering the external crystal already?

There is no High speed crystal on that board.

LCE
Principal

@Oli98 grab a scope and check what's actually connected as HSE source.
On the Nucleos there is usually NOT a crystal, but the MCO from the ST-Link MCU.

If you soldered a crystal on to the Nucleo, then make sure that all the jumpers / solder bridges are set o removed correctly.

And as someone else already said, activate the MCO so that you cab check its internal clock.

Oh I assumed teh 8Mhz crytsal on the nucleo was the HSE source. The board I was using is teh STM32F072RB NUCLEO-64

 

So why are you setting in the Cube Clock Tree Diagram to 32 MHz?? The HSE source from the ST-LINK/V2-1 MCO pin is 8 MHz

Make sure HSE_VALUE in the stm32xyz_hal_conf.h also reflects the clock source.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Again still no. I was asking for  -->>> HSE <<-- , NOT HSI settings

Tips and Tricks with TimerCallback https://www.youtube.com/@eebykarl
If you find my solution useful, please click the Accept as Solution so others see the solution.
Oli98
Associate II

Hi guys thankyou for the help, @Tesla DeLorean you was right! I assumed the deafult configuration for the nucleo board would be set to match the on board crystal which was 8MHz (the default value was 32MHz). changing the input frequency for HSE as per the diagram below:

Oli98_0-1701800483925.png

my CAN comms began to work, thankyou very much for the help guys, Im still learning about all this embedded stuff so I appreciate the time!

Thanks,

Oliver