cancel
Showing results for 
Search instead for 
Did you mean: 

STMF0x + CANbx + HSI48?

Lee Davies
Associate II
Posted on February 21, 2017 at 01:01

Hi,

My using the STM32F072 with CANBus. I was going to use the HSI48 throughout however I discovered an issue. 

According to the Bosch CAN specification...

'A maximum oscillator tolerance of 1.58% is given and therefore the use of a ceramic resonator at a bus speed of up to 125 Kbits/s as a rule of thumb

 

I was going to run the CANBus at 250Kbits/s using the HSI48, however the STM32F072 User Manual highlights an issue...

'the HSI48 RC oscillator runs on its default frequency which is subject to manufacturing process variations, this is why each device is factory calibrated by ST for ~3% accuracy at TA = 25°C'

 

I could get away with using the HSI (+PLL), since the 

STM32F072 User Manual quotes better HSI accuracy...

'the HSI RC oscillator frequencies can vary from one chip to another due to manufacturing process variations, this is why each device is factory calibrated by ST for 1% accuracy at TA=25°C'

 

 

Has anybody had any experience running CAN with internal clocks?

Cheers,

Lee

1 REPLY 1
T J
Lead
Posted on February 21, 2017 at 15:15

my 48MHz '091 is running CanBus perfectly, without a crystal at 250KHz.

I can leave it running for hours without error.

occasionally you can see an error go through, but the CAN hardware recovers instantly.

I use a CanDO unit from the UK to pound data at my slave.

my slave sends 4x frames with an 8 byte payload every 0.4Seconds whilst being pounded with 12 frames every 10mS from the CanDo.

It seems to work brilliantly, in my experience.

no errors for hours at a time