why the Flexcan can't be set bitrate with 5000bps

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

why the Flexcan can't be set bitrate with 5000bps

Jump to solution
922 Views
miozhang
Contributor I

Hello, is there someone can help me ? 

I get some problems when development with imx6ul processer, that i can't set the bitrate with 5000bps;

what i have done:

1. ifconfig can0 down 

2. canconfig can0 bitrate 5000

3. ifconfig can0 up

the kernel logs;

flexcan 2090000.can can0: writing ctrl=0xf93e2057
flexcan 2090000.can can0: flexcan_set_bittiming: mcr=0x5980000f ctrl=0xf93e2057
flexcan 2090000.can can0: flexcan_chip_start: writing mcr=0x7de20209
flexcan 2090000.can can0: flexcan_chip_start: writing ctrl=0xf93eac57

pastedImage_2.png

bitrate details:

2: can0: <NOARP,ECHO> mtu 16 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 10
link/can promiscuity 0
can state STOPPED (berr-counter tx 0 rx 0) restart-ms 0
bitrate 5000 sample-point 0.708
tq 8333 prop-seg 8 phase-seg1 8 phase-seg2 7 sjw 1
flexcan: tseg1 4..16 tseg2 2..8 sjw 1..4 brp 1..256 brp-inc 1
clock 30000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 0 0 0
RX: bytes packets errors dropped overrun mcast
0 0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
0 0 0 0 0 0

Labels (1)
0 Kudos
1 Solution
867 Views
igorpadykov
NXP Employee
NXP Employee

Hi mio

one can look at patch below

can: flexcan: fix timeout when set small bitrate - Patchwork 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
2 Replies
868 Views
igorpadykov
NXP Employee
NXP Employee

Hi mio

one can look at patch below

can: flexcan: fix timeout when set small bitrate - Patchwork 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
867 Views
miozhang
Contributor I

thanks for your help!

0 Kudos