I have modify kernel to enable flexcan on SabreSD board and I can find can0 when system boot up.
But when I try to bring up can0 with "ip link set can0 up type can bitrate 125000" I find two IRQ error from kernel message:
flexcan 2090000.can can0: writing ctrl=0x0e312005
flexcan 2090000.can can0: flexcan_set_bittiming: mcr=0x5980000f ctrl=0x0e312005
flexcan 2090000.can can0: flexcan_chip_start: writing mcr=0x7de2020d
flexcan 2090000.can can0: flexcan_chip_start: writing ctrl=0x0e31ac55
flexcan 2090000.can can0: flexcan_chip_start: reading mcr=0x6de2020d ctrl=0x0e31ac55
flexcan 2090000.can can0: Error Warning IRQ
flexcan 2090000.can can0: Error Passive IRQ
flexcan 2090000.can can0: bus-off
When I try to send packet from can0 by cansend, I can't measure any change from TX pin.
Does anyone know the problem of it?
Hi Jim
by default SabreSD BSP does not support flexcan, please follow
guidelines on
How to enable CAN bus on i.MX6Q SabreSD
How to use FlexCAN in Android OS
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi igorpadykov ,
Thanks for your reply. But unfortunately, these information are not useful for my condition. These environments are not the same as Android 5.0.2 released by NXP. My problem is the bus will become bus-off when I bring it up. I have trace flexcan.c in drivers/net/can/ and I guess the bus-off is come from flexcan_poll_state() and in do_state() it will call can_bus_off if new_state is CAN_STATE_BUS_OFF. I can't find any discuss about this issue on community. How can I prevent the can bus become bus-off?