cancel
Showing results for 
Search instead for 
Did you mean: 

Precise clock for CAN in stm32l432kc, what's the best approach?

Hi,

We are developing a board with the stm32l432kc comunicating thru CAN bus @500kbit/s, and after reading about the internal clock precision (1% at best for HSI16 in the 0-85C temperature range) we are concerned that it could lead to CAN communication problems ( seems like CAN tolerate 0.5% as max clock deviation), and the best solution should be adding a more precise external clock, but seems that there is no way of adding an external crystal to drive the main clock in this part (is only possible to add a 32k crystal to the RTC), only an external clock source, so:

  • is this correct? there is no way of clocking this chip with an external crystal?
  • If not, what could be the best solution for this case? MEMS oscilator would fit as a precise CLK_IN source?
  • How people using the CAN peripheral in this part handled this issue?

Thanks in advance

5 REPLIES 5
Uwe Bonnes
Principal III

You can use the 32k crystal als reference of an internal PLL adjusting MSI. Look for MSIPLLEN.

Uwe Bonnes
Principal III

The STM32L432KB datasheet is missleading with regard to HSE as it often mentions HSE, also HSE is not available. I just tried to ask a question about that issue, but the forum does not allow to ask questions at the moment. Argh.

That's nice, I had not noticed this solution, thanks for the input!

But now I am searching in the datasheet/reference manual how acurate this configuration is, the datasheet only says that MSI in PLL mode will have a typical freq of 3.998MHz for the 4MHz config, but I could not find how to relate the crystal accuracy with the MSI PLL clock accuracy ( we will use a 32khz 20ppm crystal), do you know how to relate them? is there any preferable MSI range to combine with this PLL and get the most acurate clock possible? (seems that the 48MHz is the one with the lowest percetual error)

I'm using these parts, you can provide HSE source via CK_IN, but is it isn't a case of bonding to multiple die pins.​

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

Ah. I searched for CLK_IN and did not find it. Should have uses CK_IN