This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM3358: CAN does not support 10K bitrate

Part Number: AM3358

Tool/software: Linux

hi all:

platform:am3358

SDK:ti-processor-sdk-linux-am335x-evm-03.02.00.05

my project have two can,they all can work in 20k,50k bit rate,but it can not work in 10K bit rate .can anyone give me a help

  • Hi,

    I don't see any errors in this picture you have posted. Can you explain in more details?
  • in my test,CAN0L---CAN1L,CAN0H---CAN1H.
    in 10k bit rate ,test,can0 send data,but candump can not dump any data.
    int 10001 bit rate or larger than 10k,can0 send data,candump can dump the data which can0 send.

    see this test,test 20k bit rate,candump the right data.

    see this test,try 10k bit rate.candump dump no data.

    .

  • Thanks. I have notified the software team. They will respond here.
  • thanks.

    The reason for this mistake was " Am3358 not support 10k bit rate or other reason"?

    In the TRM,I'm not find am3358 Unsupported this feature.

  • Could you describe the board that you are using? Is it a TI EVM or a custom board?

    Your test setup appears to be a loopback, is it possible that line termination resistors may be playing a role here? Could you post scope plots of the wave form on the canbus for 10K , 20K and 50K?

    Does your test work at 500K and 1M bit rates?

  • hi :

        we use the custom board reference to the design of the AM335X EVM.

        yes,i test can0 connect to can1.but our Customer use CAN0 connect to PC with 10 bit rate,and test failed.CAN0 can not receive anydata,and when can0 send data,the PC can not receive any data too.

        I test 10k ,failed. 20k ok,50k ok.500k ok,800k ok,900k faild,1M faild.

    when can1 can not receive the message,i see the can0 config.

    I command "canconfig can0"

    the message is

    this is 10k test error

    root@am335x-evm:~# canconfig can0 
    can0 bitrate: 10000, sample-point: 0.875
    can0 bittiming:
     tq: 6250, prop-seq: 6 phase-seq1: 7 phase-seq2: 2 sjw: 1, brp: 150
    can0 state: BUS-OFF
    can0 restart-ms: 0
    can0 ctrlmode: loopback[OFF], listen-only[OFF], tripple-sampling[ON],one-shot[OFF], berr-reporting[OFF]
    can0 clock freq: 24000000
    can0 bittiming-constants: name c_can,
     tseg1-min: 2, tseg1-max: 16, tseg2-min: 1, tseg2-max: 8,
     sjw-max 4, brp-min: 1, brp-max: 1024, brp-inc: 1,
    root@am335x-evm:~# canconfig can1
    can1 bitrate: 10000, sample-point: 0.875
    can1 bittiming:
     tq: 6250, prop-seq: 6 phase-seq1: 7 phase-seq2: 2 sjw: 1, brp: 150
    can1 state: ERROR-PASSIVE
    can1 restart-ms: 0
    can1 ctrlmode: loopback[OFF], listen-only[OFF], tripple-sampling[ON],one-shot[OFF], berr-reporting[OFF]
    can1 clock freq: 24000000
    can1 bittiming-constants: name c_can,
     tseg1-min: 2, tseg1-max: 16, tseg2-min: 1, tseg2-max: 8,
     sjw-max 4, brp-min: 1, brp-max: 1024, brp-inc: 1,
    root@am335x-evm:~# ip -d -s link show can0
    2: can0: <NO-CARRIER,NOARP,UP,ECHO> mtu 16 qdisc fq_codel state DOWN mode DEFAULT group default qlen 10
        link/can  promiscuity 0
        can <TRIPLE-SAMPLING> state BUS-OFF (berr-counter tx 248 rx 0) restart-ms 0
       bitrate 10000 sample-point 0.875
       tq 6250 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
       c_can: tseg1 2..16 tseg2 1..8 sjw 1..4 brp 1..1024 brp-inc 1
       clock 24000000
       re-started bus-errors arbit-lost error-warn error-pass bus-off
       0          0          0          1          1          1        
        RX: bytes  packets  errors  dropped overrun mcast  
        24         3        0       0       0       0      
        TX: bytes  packets  errors  dropped carrier collsns
        0          0        0       0       0       0      
    root@am335x-evm:~# ip -d -s link show can1
    3: can1: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc fq_codel state UNKNOWN mode DEFAULT group default qlen 10
        link/can  promiscuity 0
        can <TRIPLE-SAMPLING> state ERROR-PASSIVE (berr-counter tx 0 rx 127) restart-ms 0
       bitrate 10000 sample-point 0.875
       tq 6250 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
       c_can: tseg1 2..16 tseg2 1..8 sjw 1..4 brp 1..1024 brp-inc 1
       clock 24000000
       re-started bus-errors arbit-lost error-warn error-pass bus-off
       0          0          0          1          1          0        
        RX: bytes  packets  errors  dropped overrun mcast  
        16         2        0       0       0       0      
        TX: bytes  packets  errors  dropped carrier collsns
        0          0        0       0       0       0      

    this is the 1M test

    root@am335x-evm:~# canconfig can0
    can0 bitrate: 1000000, sample-point: 0.750
    can0 bittiming:
     tq: 83, prop-seq: 4 phase-seq1: 4 phase-seq2: 3 sjw: 1, brp: 2
    can0 state: BUS-OFF
    can0 restart-ms: 0
    can0 ctrlmode: loopback[OFF], listen-only[OFF], tripple-sampling[ON],one-shot[OFF], berr-reporting[OFF]
    can0 clock freq: 24000000
    can0 bittiming-constants: name c_can,
     tseg1-min: 2, tseg1-max: 16, tseg2-min: 1, tseg2-max: 8,
     sjw-max 4, brp-min: 1, brp-max: 1024, brp-inc: 1,
    root@am335x-evm:~# canconfig can1
    can1 bitrate: 1000000, sample-point: 0.750
    can1 bittiming:
     tq: 83, prop-seq: 4 phase-seq1: 4 phase-seq2: 3 sjw: 1, brp: 2
    can1 state: ERROR-ACTIVE
    can1 restart-ms: 0
    can1 ctrlmode: loopback[OFF], listen-only[OFF], tripple-sampling[ON],one-shot[OFF], berr-reporting[OFF]
    can1 clock freq: 24000000
    can1 bittiming-constants: name c_can,
     tseg1-min: 2, tseg1-max: 16, tseg2-min: 1, tseg2-max: 8,
     sjw-max 4, brp-min: 1, brp-max: 1024, brp-inc: 1,
    root@am335x-evm:~#

    root@am335x-evm:~# ip -d -s link show can0
    2: can0: <NO-CARRIER,NOARP,UP,ECHO> mtu 16 qdisc fq_codel state DOWN mode DEFAULT group default qlen 10
        link/can  promiscuity 0
        can <TRIPLE-SAMPLING> state BUS-OFF (berr-counter tx 248 rx 0) restart-ms 0
       bitrate 1000000 sample-point 0.750
       tq 83 prop-seg 4 phase-seg1 4 phase-seg2 3 sjw 1
       c_can: tseg1 2..16 tseg2 1..8 sjw 1..4 brp 1..1024 brp-inc 1
       clock 24000000
       re-started bus-errors arbit-lost error-warn error-pass bus-off
       0          0          0          1          1          1        
        RX: bytes  packets  errors  dropped overrun mcast  
        24         3        0       0       0       0      
        TX: bytes  packets  errors  dropped carrier collsns
        0          0        0       0       0       0      
    root@am335x-evm:~# ip -d -s link show can1
    3: can1: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc fq_codel state UNKNOWN mode DEFAULT group default qlen 10
        link/can  promiscuity 0
        can <TRIPLE-SAMPLING> state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
       bitrate 1000000 sample-point 0.750
       tq 83 prop-seg 4 phase-seg1 4 phase-seg2 3 sjw 1
       c_can: tseg1 2..16 tseg2 1..8 sjw 1..4 brp 1..1024 brp-inc 1
       clock 24000000
       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  
        96         16       0       0       0       0      
        TX: bytes  packets  errors  dropped carrier collsns
        0          0        0       0       0       0 

    why it work bad in some bit rate?