cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX Bug Report - CAN bus configurator

petr239955
Associate III
Posted on March 05, 2015 at 22:55

0690X00000605fhQAA.png

STM32CubeMX 4.6.0

Configurator for

CAN

controller

has

inaccuracy

in

calculating

of time for one bit

.

If I set

the values for

CAN

speed 500

kbit

/s

(

bit

time

2000

ns

)

then

configurator

show 2004

ns.

If

you calculate

the bit

time

from

BS1=8

,

BS2=3,

prescaler

=8 and APB=48 Mhz, the bit time is

2000

ns

.

0690X00000605fmQAA.png

I also recommend

to add to CAN configurator

the calculated

sample

point

.

It's a very

important value

.

stm32cubemx-bug-can-bus-bit-time

2 REPLIES 2
Posted on March 06, 2015 at 01:30

I also recommend

to add to CAN configurator

the calculated

sample

point

.

It's a very

important value

.

What kind of value are we shooting for in an ideal CAN implementation?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
petr239955
Associate III
Posted on March 08, 2015 at 14:41

What kind of value are we shooting for in an ideal CAN implementation?

Each implementation

of the CAN

bus

should be specified:

-

speed

-s

ample

point

-SJW

-

number of

sample/bit (if avalaible)

to

guarantee a good

compatibility of all

nodes.

It is also necessary

to

check

the number of

TQ/bit (SYNC_SEG+PROP_SEG+PHASE_SEG1+PHASE_SEG2). I

t

should be

in the range of

8 to 25

.

Most controllers configurators show in the table all possible settings.

For example Fujitsu Bitmixer:

0690X00000605fiQAA.png

If

STM32CubeMX

CAN

configurator

has a different

philosophy

,

then it would

be useful

show the CAN bus speed,

the sample point

and

indicate

if number of

TQ

<

8.