2023-12-03 09:15 AM
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!
Solved! Go to Solution.
2023-12-05 02:33 AM
Do you soldering the External Crystal on that board already?
there is no high speed crystal on that board, isn't it?
2023-12-05 02:36 AM
I tested like this and it still didnt work?
2023-12-05 02:56 AM
the other stuff is that you had soldering the external crystal already?
There is no High speed crystal on that board.
2023-12-05 03:45 AM
@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.
2023-12-05 08:52 AM
Oh I assumed teh 8Mhz crytsal on the nucleo was the HSE source. The board I was using is teh STM32F072RB NUCLEO-64
2023-12-05 09:17 AM
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.
2023-12-05 09:29 AM
Again still no. I was asking for -->>> HSE <<-- , NOT HSI settings
2023-12-05 10:23 AM
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:
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