Report
6 months, 3 weeks 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:

CAN

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:

/media/uploads/masrodjie/2018-05-17_20-31-26.jpg

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

/media/uploads/masrodjie/2018-05-17_20-30-56.jpg

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

Thank you

Comment on this question

2 Answers

4 days, 10 hours ago.

I think you should look here https://essaysreasy.online/blog/easy-essay-topics for more information. Actually, there is a fine tutorial.

4 days, 9 hours 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.