1 year, 1 month ago.

CAN bus on STM32F407VET6 show incorrect result

I am trying to implement can bus on STM32F407VET6 with the following tutorial on:

Import programSTM32F407VET6_Hello

Using low cost STM32F407VET6 boards with mbed.

Testing to put the CAN message:


frequency: 100k
format: CANStandard
id : 0x10
type : CANData
len : 8
data[0] = 0x01;
data[1] = 0x02;
data[2] = 0x03;
data[3] = 0x04;
data[4] = 0x05;
data[5] = 0x06;
data[6] = 0x07;
data[7] = 0x08;

And here's the result via analyzer:


Trying to set the frequency on analyzer to 99k and it show the result almost correct, just the CAN id still wrong.


So i guess the CAN configuration is wrong (SJW, BS1, BS2 ...). How to adjust this config?

Thank you

Comment on this question

1 Answer

6 months, 3 weeks ago.

Hello Arnas,

Sorry for my late response:

  • Because a given CAN speed is derived from the MCU's clock frequency by series of divisions and multiplications, some speeds can be matched more accurately than others (similar to UART bitrates). That's why we should account for it when selecting a CAN speed for our application.
  • I think the CAN Identifier in your test is correct (16 dec = 0x10 hex)

To post an answer, please log in.