cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G0B1KBU7 (UFQFPN32) and clock for FDCAN peripheral

Kraal
Senior III

Hello,

We are planning on replacing the F042 (TSSOP20) with the G0 cited in the question.

At the moment the F042 use a HSE crystal of 8MHz in order to get a precise enough clock for the CAN peripheral.

Parsing the datasheet of the G0B1KB, there is no way to use a high speed crystal anymore, it has only the ability of CLOCK_IN, no CLOCK_OUT.

Since using a LSE is OK, I tried to see if the HSI could be trimmed with the LSE (nice feature of the L4 family), but no, it is not possible.

My question is: is it possible to use the FDCAN peripheral (in standard CAN 2.0B) mode with the G0B1KB and the HSI ? Is it precise enough ?

Best regards.

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

You could use something that outputs a clock, such as a TXCO.

Otherwise you'll need to do the math to determine the tolerance in your design. My guess is without calibrating, HSI will not be accurate enough over the full temperature range.

https://www.nxp.com/docs/en/application-note/AN1798.pdf

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

5 REPLIES 5
TDK
Guru

You could use something that outputs a clock, such as a TXCO.

Otherwise you'll need to do the math to determine the tolerance in your design. My guess is without calibrating, HSI will not be accurate enough over the full temperature range.

https://www.nxp.com/docs/en/application-note/AN1798.pdf

If you feel a post has answered your question, please click "Accept as Solution".
Kraal
Senior III

Hi @TDK​ ,

Thanks for the answer.

A clock generator would be the answer, but I will go with the UFQFPN48 package instead as it has all the CLOCK_IN/OUT pins needed.

All the TXCO I could find have a tremendous current consumption of around 30mA, which is understandable, but too much for me.

Best regards.

> Since using a LSE is OK, I tried to see if the HSI could be trimmed with the LSE (nice feature of the L4 family), but no, it is not possible.

Why do you think so? There's even a Calibration of the HSI16 oscillator subchapter in RM0444.

The 'G0B1 has also HSI48 which can "autotune" to LSE; this can't be used directly as FDCAN clock but at the cost of an extra pin, maybe you can feed it out through MCO and back as HSE in BYPASS mode [edit]OK this is not possible in the QFN32, where OSC_IN is shared on PC14 with OSC32_IN [/edit]

JW

I guess I'm spoiled by the L4 family where the tuning of the MSI by the LSE happens automatically all the time (if configured so).

@Community member​ you are correct, I did not look at the calibration process close enough, it should be possible to call the calibration routine from time to time.

The MCO + HSE bypass can be a helpful trick for future design :)

Best regards.

> tuning of the MSI by the LSE happens automatically

Ah that. Yes, it's a nice feature indeed.

JW