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.

ti_hecc ti_hecc: Error Warning interrupt ti_hecc ti_hecc: bus-off - CAN bus not working on AM3517

Other Parts Discussed in Thread: AM3517

Hi All,

I want to enable/test CAN interface in loopback mode on AM3517 EVM.

correct me if im wrong.

prebuilt AM3517 images wont support TI_HECC CAN driver bcz of pin muxing not done in kernel,

So i hv added pin muxing for TI_HECC in mux34xx.c like below

#define OMAP3_CONTROL_PADCONF_HECC1_TXD_OFFSET            0x1e4
#define OMAP3_CONTROL_PADCONF_HECC1_RXD_OFFSET            0x1e6

then

i hv added support in board file also "board-am3517vm.c like below

        OMAP3_MUX(HECC1_TXD, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),       /* CAN_TX */
       OMAP3_MUX(HECC1_RXD, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), /* CAN_RX */

I hv updated in u-boot too like below

    /* HECC */\
    MUX_VAL(CP(HECC1_TXD),        (IDIS  | PTU | EN  | M0)) \
    MUX_VAL(CP(HECC1_RXD),        (IEN  | PTU | EN  | M0)) \

After i hv compiled kernel &u-boot ,

but CAN interfaces is not working.

ti_hecc ti_hecc: Error Warning interrupt

ti_hecc ti_hecc: bus-off

3) When I send frames through loopback comands to CAN0 and I do not  see the RX frames increasing in logs.

PFA of log

root@am3517-evm:/#
root@am3517-evm:/# ip link set can0 type can bitrate 10000 triple-sampling on
root@am3517-evm:/#
root@am3517-evm:/# ip link set can0 up
[  101.687133] gpio_request: gpio-214 (can_stb) status -22
[  101.692749] failed to get can_stb
[  101.696319] ti_hecc ti_hecc: resetting hecc ...
[  101.701141] ti_hecc ti_hecc: setting CANBTC=0x4000fa
root@am3517-evm:/#
root@am3517-evm:/# candump can0 -d
interface = can0, family = 29, type = 3, proto = 1
root@am3517-evm:/#
root@am3517-evm:/# cansend can0 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88
interface = can0, family = 29, t[  112.903717] ti_hecc ti_hecc: Error Warning interrupt
ype = 3, proto = 1
root@am3517-evm:/# [  112.949157] ti_hecc ti_hecc: bus-off

root@am3517-evm:/#
root@am3517-evm:/# ip -details -statistics link show can0
2: can0: <NO-CARRIER,NOARP,UP,ECHO> mtu 16 qdisc pfifo_fast state DOWN mode DEFAULT qlen 10
    link/can
    can <TRIPLE-SAMPLING> state BUS-OFF restart-ms 0
    bitrate 10000 sample-point 0.850
    tq 5000 prop-seg 8 phase-seg1 8 phase-seg2 3 sjw 1
    ti_hecc: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..256 brp-inc 1
    clock 13000000
    re-started bus-errors arbit-lost error-warn error-pass bus-off
    0          1          0          1          0          1         
    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      
root@am3517-evm:/#
root@am3517-evm:/# cansend can0 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88
interface = can0, family = 29, type = 3, proto = 1
root@am3517-evm:/#
root@am3517-evm:/#
root@am3517-evm:/# ip -details -statistics link show can0
2: can0: <NO-CARRIER,NOARP,UP,ECHO> mtu 16 qdisc pfifo_fast state DOWN mode DEFAULT qlen 10
    link/can
    can <TRIPLE-SAMPLING> state BUS-OFF restart-ms 0
    bitrate 10000 sample-point 0.850
    tq 5000 prop-seg 8 phase-seg1 8 phase-seg2 3 sjw 1
    ti_hecc: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..256 brp-inc 1
    clock 13000000
    re-started bus-errors arbit-lost error-warn error-pass bus-off
    0          1          0          1          0          1         
    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      
root@am3517-evm:/#
root@am3517-evm:/#
root@am3517-evm:/# cansend can0 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88
interface = can0, family = 29, type = 3, proto = 1
root@am3517-evm:/#
root@am3517-evm:/#
root@am3517-evm:/# ip -details -statistics link show can0
2: can0: <NO-CARRIER,NOARP,UP,ECHO> mtu 16 qdisc pfifo_fast state DOWN mode DEFAULT qlen 10
    link/can
    can <TRIPLE-SAMPLING> state BUS-OFF restart-ms 0
    bitrate 10000 sample-point 0.850
    tq 5000 prop-seg 8 phase-seg1 8 phase-seg2 3 sjw 1
    ti_hecc: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..256 brp-inc 1
    clock 13000000
    re-started bus-errors arbit-lost error-warn error-pass bus-off
    0          1          0          1          0          1         
    RX: bytes  packets  errors  dropped overrun mcast   
    16         2        0       0       0       0      
    TX: bytes  packets  errors  dropped carrier collsns
    0          0 

root@am3517-evm:/#

root@am3517-evm:/#

Plz help me anyone to come out from this issue

thanks in advance.

Thanks&Regards,

Titus S.