I have the sample Qt app which receives and transmit CAN messages and I am using CAN simulator for Tx and Rx CAN messages.
The following command used to set the bitrate 250kbps.
ip link set up can1 type can bitrate 250000 restart-ms 100
ip link set can1 up
The sample App works perfectly fine for 250 kbps but for 500kbps am getting an error stating “bus-off” in CAN simulator.
( ip link set up can1 type can bitrate 500000 restart-ms 100)
Am I missing any steps ? should I need to configure anything to hardware or Qt App to have CAN communication with 500kbps bitrate?
More details of CAN config:
ip -details link show can1
3: can1: mtu 16 qdisc pfifo_fast state UNKNOWN mode DE0
link/can promiscuity 0
can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 100
bitrate 250000 sample-point 0.866
tq 266 prop-seg 6 phase-seg1 6 phase-seg2 2 sjw 1
flexcan: tseg1 4..16 tseg2 2..8 sjw 1..4 brp 1..256 brp-inc 1
clock 30000000numtxqueues 1 numrxqueues 1
1). The CAN config details after setting up CAN speed to 500kps is as follows:
# ip -details link show can1
3: can1: mtu 16 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 10
link/can promiscuity 0
can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 100
bitrate 500000 sample-point 0.866
tq 133 prop-seg 6 phase-seg1 6 phase-seg2 2 sjw 1
flexcan: tseg1 4..16 tseg2 2..8 sjw 1..4 brp 1..256 brp-inc 1
clock 30000000numtxqueues 1 numrxqueues 1
2). The CAN config details after trying to Tx/Rx CAN messages.
# ip -details link show can1
3: can1: mtu 16 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 10
link/can promiscuity 0
can state ERROR-WARNING (berr-counter tx 0 rx 131) restart-ms 100
bitrate 500000 sample-point 0.866
tq 133 prop-seg 6 phase-seg1 6 phase-seg2 2 sjw 1
flexcan: tseg1 4..16 tseg2 2..8 sjw 1..4 brp 1..256 brp-inc 1
clock 30000000numtxqueues 1 numrxqueues 1
Are you using a CAN Transceiver? If yes, could you provide a datasheet of the transceiver?
I’m using Pcan view, the datasheet/user manual can be found here:
Here , the main issue is with obtaining sample-point above 0.866, for which we need to change the clock from 30000000 to 40000000. Could you please let us know how to change this?
Here , the main issue is with obtaining sample-point above 0.866, for which we need to change the clock from 30000000 to 40000000. Could you please let us know how to change this?
Which clock are you talking about?
Could you use install one of the Toradex Images with Qt included and check if you still see the issue there?