Can Protocol (small issue)

  • Hello, "rk3576_canfd ff320000.can: Failed to request rxchan" merely indicates that DMA is not being used for receiving. I'm not quite clear on what "Programmable IO (simply polling style)" refers to? RMIO mounts the pins to the CAN controller for receiving using interrupts rather than polling. Maybe this Programmable IO does not refer to RMIO.
    The correct configuration of DMA in the device tree should be

    Code: Select all

    dmas = <&dmac0 0  0xff2880a8 0x000c0000 0x0 0x0>;
    dma-names = "rx";
    
    For details, please refer to https://opensource.rock-chips.com/image ... 250811.pdf. Finally, enter the system to view the logs.

    Code: Select all

    root@luckfox:~# dmesg | grep can
    [    1.512608] rk3576_canfd ff320000.can: CAN info: use_dma = 1, rx_max_data = 18, fifo_depth = 14
    [    1.636404] can: Controller Area Network core
    [    1.636638] can: Raw protocol
    [    1.636668] can: Broadcast Manager protocol
    [    1.636701] can: Netlink gateway - max_hops=1
    [    2.387587] ubi0: Scanning is finished 
    
  • Thank you for your reply.
    After changing the .dts file the way you specified everything worked nicely!

    Code: Select all

    root@luckfox:~# dmesg | grep -i can
    [    1.500689] CAN device driver interface
    [    1.502588] rk3576_canfd ff320000.can: CAN info: use_dma = 1, rx_max_data = 18, fifo_depth = 14
    [    1.619824] can: controller area network core
    [    1.619986] NET: Registered PF_CAN protocol family
    [    1.620024] can: raw protocol
    [    1.620050] can: broadcast manager protocol
    [    1.620078] can: netlink gateway - max_hops=1
    
    Thank you!