Skip to main content
Visitor II
November 26, 2023
Solved

FDCAN can not start, no clock found

  • November 26, 2023
  • 1 reply
  • 5744 views

after follow the wiki, the can0(m_can2) can not start up on stm32mp157d-dk1

root@stm32mp1:~# dmesg | grep can
[ 0.384348] can: controller area network core
[ 0.384666] can: raw protocol
[ 0.384678] can: broadcast manager protocol
[ 0.384695] can: netlink gateway - max_hops=1
[ 0.663370] m_can_platform 4400f000.can: no clock found

 

root@stm32mp1:~# cat /sys/kernel/debug/clk/clk_summary | grep fdcan
fdcan_k 0 0 0 74250000 0 0 50000 N
fdcan 0 0 0 104438965 0 0 50000 N

    This topic has been closed for replies.
    Best answer by Erwan SZYMANSKI

    Hello @Huibean ,
    With taking a better look at your device tree, I see that you include stm32mp157a-dk1-scmi.dtsi.

    I ask myself, as this file has been made to configure only IPs that are on the board in question, I think the configuration for m_can2 is missing in your own case.

    Can you please add this into the file, and tell me if it corrects something :

     

    &m_can2 {
    	clocks = <&scmi_clk CK_SCMI_HSE>, <&rcc FDCAN_K>;
    };

     

    Kind regards,
    Erwan.

    1 reply

    Technical Moderator
    November 28, 2023

    Hello @Huibean,
    What gives you the following command :
    Board $> cat /sys/kernel/debug/clk/clk-summary 

    Moreover, can you show us how did you configure your device tree for can node ?(cf: https://wiki.stmicroelectronics.cn/stm32mpu/wiki/FDCAN_device_tree_configuration)

    Kind regards,
    Erwan.

    HuibeanAuthor
    Visitor II
    November 28, 2023

    I have the clk_summary output like blew, full opuput need to get it tomorrow, the device tree are posted in the file

     

    root@stm32mp1:~# cat /sys/kernel/debug/clk/clk_summary | grep fdcan
    fdcan_k 0 0 0 74250000 0 0 50000 N
    fdcan 0 0 0 104438965 0 0 50000 N

     

    by decode the dtb I can get content like below

     

    can@4400f000 {
    compatible = "bosch,m_can";
    reg = <0x4400f000 0x400 0x44011000 0x2800>;
    reg-names = "m_can\0message_ram";
    interrupts = <0x00 0x14 0x04 0x00 0x16 0x04>;
    interrupt-names = "int0\0int1";
    clocks = <0x0b 0x00 0x0b 0x9d>;
    clock-names = "hclk\0cclk";
    bosch,mram-cfg = <0x1400 0x00 0x00 0x20 0x00 0x00 0x02 0x02>;
    feature-domains = <0x24 0x3e>;
    status = "okay";
    pinctrl-names = "default\0sleep";
    pinctrl-0 = <0x5f>;
    pinctrl-1 = <0x60>;
    phandle = <0xd7>;
    };

    updated:

    full clk_summary in file

     

    Technical Moderator
    December 8, 2023

    Hello,
    This topic has been answered on this link : https://community.st.com/t5/stm32-mpus-products/no-clock-found-for-fdcan-stm32mp157d-dk1/m-p/612096

    Kind regards,
    Erwan.