cancel
Showing results for 
Search instead for 
Did you mean: 

CAN Legacy with STM32F042, STM32Cube Version 5.3.0, FW V1.10.

christophkeiner9
Associate III

I wanted to use the CAN Legacy Driver like i did it in my old STM32F103 Project (Same Cube Version. latest Firmware) but i failed.

I copied the Legacy CAN-Module to the Driver Source-Path, the Legacy Include's were already included.

But what should i do now? In the old Project i only enabled the Legacy Driver in the HAL_conf.h, but this Fails with the STM32F042.

What is the way to enable it here, or is there anywhere a good example how to ust Interrupt Receive with the new Driver??

10 REPLIES 10

Hi Paul, at 125kbs it may work at room temperature because the HSI has app. +1.5% to -1% accuracy after soldering (Page 65 of the Datasheet).

A collegue also made a design with internal Oszillator and he found also that 125k is the maximum Baudrate. But if you expect a higher Temperature Range it may fail.

There are some good application notes if you google for CAN Clock deviation calculating the maximum oscillator tolerance for certain propagation delays and cable length.

Meanwhile there are a lot of MEMS oscillators which are small and have a very good accuracy.

Look at the Design of Karl, i think he uses the USB clock Synchronisation so he seem's to need no crystal also at higher Data rates.

This is a very nice feature, but i have no USB in y Design so i needed a crystal.