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.

[参考译文] AM625:AM625 (HS-PRUSS):FS 9.0:PRUSS 错误

Guru**** 2487425 points
Other Parts Discussed in Thread: AM625

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1437651/am625-am625-hs-fs-sdk9-0-pruss-error

器件型号:AM625

工具与软件:

您好、TI:

我们使用的是 SDK9.0。

我们已  从 FS 器件迁移到 GP 器件。

在 HS-PRUSS 器件中、引导内核时出现以下错误、看起来与 FS 有关。 和 MCAN 无法正常工作。

[    7.880716] spi-nor spi1.1: w25q64dw (8192 Kbytes)
[    7.889544] Internal error: synchronous external abort: 0000000096000010 [#1] PREEMPT SMP
[    7.897742] Modules linked in: sa2ul(+) cdns_dphy_rx(+) mcrc pruss(+) spi_omap2_mcspi(+) fuse ipv6
[    7.906720] CPU: 2 PID: 222 Comm: systemd-udevd Not tainted 6.1.46-g1f8ca96285 #1
[    7.914194] Hardware name: Smarc based msc sm2s-am625x board (DT)
[    7.920276] pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[    7.927230] pc : clk_mux_get_parent+0x58/0x80
[    7.931600] lr : __clk_register+0x1e0/0x814
[    7.935782] sp : ffff800009e5b5c0
[    7.939087] x29: ffff800009e5b5c0 x28: 0000000000000040 x27: ffff000003f8c780
[    7.946218] x26: ffff8000091cf258 x25: 0000000000000002 x24: ffff000003f55b00
[    7.953347] x23: ffff000003f55d80 x22: ffff000003f55980 x21: ffff000003f55b50
[    7.960475] x20: ffff000003f55b80 x19: ffff000003f8c900 x18: ffffffffffffffff
[    7.962542] spi-nor spi2.0: w25q64dw (8192 Kbytes)
[    7.967603] x17: 0000000000000000 x16: 0000000000000000 x15: ffff000003f55d8d
[    7.967614] x14: 0000000000000000 x13: 0078756d2d6b6c63 x12: 65726f632e737375
[    7.967623] x11: 0101010101010101 x10: 0000000003f50c80 x9 : 0000000000000001
[    7.967632] x8 : 0101010101010101 x7 : 0000000000000000 x6 : 505c5f575b1d535f
[    7.967641] x5 : 5f531d5b575f5c50 x4 : ffff800009cab03c x3 : 6660606860606060
[    7.967650] x2 : ffff800008587cc0 x1 : 0000000000000000 x0 : ffff000003f55d80
[    7.967662] Call trace:
[    7.967666]  clk_mux_get_parent+0x58/0x80
[    7.975199] spi-nor spi2.1: w25q64dw (8192 Kbytes)
[    7.979571]  __clk_register+0x1e0/0x814
[    7.979580]  clk_hw_register+0x20/0x60
[    7.979585]  __clk_hw_register_mux+0x148/0x1dc
[    7.979592]  clk_register_mux_table+0x4c/0x70
[    7.979599]  pruss_clk_mux_setup.constprop.0+0x108/0x250 [pruss]
[    7.979624]  pruss_cfg_of_init+0x17c/0x230 [pruss]
[    7.979638]  pruss_probe+0x184/0x314 [pruss]
[    7.979651]  platform_probe+0x68/0xe0
[    8.061445]  really_probe+0xbc/0x2dc
[    8.065033]  __driver_probe_device+0x78/0x114
[    8.069386]  driver_probe_device+0xd8/0x15c
[    8.073568]  __driver_attach+0x94/0x19c
[    8.077399]  bus_for_each_dev+0x70/0xd0
[    8.081229]  driver_attach+0x24/0x30
[    8.084801]  bus_add_driver+0x154/0x20c
[    8.088632]  driver_register+0x78/0x130
[    8.092465]  __platform_driver_register+0x28/0x34
[    8.097161]  pruss_driver_init+0x20/0x1000 [pruss]
[    8.101960]  do_one_initcall+0x50/0x1d0
[    8.105797]  do_init_module+0x48/0x1d0
[    8.109549]  load_module+0x18e8/0x1c70
[    8.113296]  __do_sys_finit_module+0xa8/0x100
[    8.117651]  __arm64_sys_finit_module+0x20/0x30
[    8.122173]  invoke_syscall+0x48/0x114
[    8.125916]  el0_svc_common.constprop.0+0xd4/0xfc
[    8.130609]  do_el0_svc+0x30/0xd0
[    8.133915]  el0_svc+0x2c/0x84
[    8.136963]  el0t_64_sync_handler+0xbc/0x140
[    8.141222]  el0t_64_sync+0x18c/0x190
[    8.144881] Code: 97fffe72 a8c17bfd d50323bf d65f03c0 (b9400084) 
[    8.150960] ---[ end trace 0000000000000000 ]---
[    8.181967] k3-m4-rproc 5000000.m4fss: assigned reserved memory node m4f-dma-memory@9cb00000
[    8.190831] m_can_platform 4e00000.can: sidf 0x0 128 xidf 0x200 64 rxf0 0x400 64 rxf1 0x1600 64 rxb 0x2800 64 txe 0x3a00 32 txb 0x3b00 32
[    8.206544] k3-m4-rproc 5000000.m4fss: configured M4 for remoteproc mode
[    8.218287] k3-m4-rproc 5000000.m4fss: local reset is deasserted for device
[    8.231089] remoteproc remoteproc0: 5000000.m4fss is available
[    8.250781] remoteproc remoteproc0: powering up 5000000.m4fss
[    8.256685] remoteproc remoteproc0: Booting fw image am62-mcu-m4f0_0-fw, size 54860
[    8.273632] rproc-virtio rproc-virtio.5.auto: assigned reserved memory node m4f-dma-memory@9cb00000
[    8.292277] rproc-virtio rproc-virtio.5.auto: registered virtio0 (type 7)
[    8.299174] remoteproc remoteproc0: remote processor 5000000.m4fss is now up
[    8.341271] virtio_rpmsg_bus virtio0: rpmsg host is online
[    8.341795] virtio_rpmsg_bus virtio0: creating channel ti.ipc4.ping-pong addr 0xd
[    8.360089] virtio_rpmsg_bus virtio0: creating channel rpmsg_chrdev addr 0xe
[    8.378341] platform 78000000.r5f: R5F core may have been powered on by a different host, programmed state (0) != actual state (1)
[    8.415480] platform 78000000.r5f: configured R5F for IPC-only mode
[    8.423158] platform 78000000.r5f: assigned reserved memory node r5f-dma-memory@9da00000
[    8.432445] remoteproc remoteproc1: 78000000.r5f is available
[    8.438703] remoteproc remoteproc1: attaching to 78000000.r5f
[    8.445645] platform 78000000.r5f: R5F core initialized in IPC-only mode
[    8.452599] rproc-virtio rproc-virtio.6.auto: assigned reserved memory node r5f-dma-memory@9da00000







root@sm2s-am6254:~# ip link set can0 down
Cannot find device "can0"
root@sm2s-am6254:~# ip link set can0 type can bitrate 333333 dbitrate 666666 fd on
Cannot find device "can0"
    


如果我在器件树中通过以下节点禁用 PRUSS、则不会生成错误、MCAN 正常工作。

普拉斯(&P){
       状态="已禁用";
};

 

在 GP 器件中、一切都很好。

请为我们提供同样的指导、



谢谢。此致、
Ishan

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    现有的 Linux 内核是否有任何修改? 是否应用了 MCAN 覆盖层?

    您似乎使用的是 AM62定制设计电路板。 是这样吗?

    请分享以下内容: dmesg | grep can

    鉴于 CAN 的任何中断未路由到 PRU、禁用 PRU 如何影响 CAN 功能是不同寻常的。

    此致、
    Aparna

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    嗨、Aparna、  

    感谢您的答复

    是的、添加了 MCAN 器件树节点。 我们有 AM625定制电路板。

    下面列出了 MCAN 节点。

    mcu_mcan1_pins_default: mcu-mcan1-pins-default {
                    pinctrl-single,pins = <
                            AM62X_IOPAD(0x038, PIN_INPUT, 0) /* (B3) MCU_MCAN0_RX */
                            AM62X_IOPAD(0x034, PIN_OUTPUT, 0) /* (D6) MCU_MCAN0_TX */
                    >;
            };
    
            mcu_mcan2_pins_default: mcu-mcan2-pins-default {
                    pinctrl-single,pins = <
                            AM62X_IOPAD(0x040, PIN_INPUT, 0) /* (D4) MCU_MCAN1_RX */
                            AM62X_IOPAD(0x03C, PIN_OUTPUT, 0) /* (E5) MCU_MCAN1_TX */
                    >;
            };
            
    &mcu_mcan1 {
            pinctrl-names = "default";
            pinctrl-0 = <&mcu_mcan1_pins_default>;
            status = "okay";
    };
    
    &mcu_mcan2 {
            pinctrl-names = "default";
            pinctrl-0 = <&mcu_mcan2_pins_default>;
            status = "okay";
    };



    内核中没有修改。

    输出:  dmesg | grep can
    root@sm2s-am6254:~# dmesg | grep "can"   
    [    0.389719] HugeTLB: 0 KiB vmemmap can be freed for a 1.00 GiB page
    [    0.403069] HugeTLB: 0 KiB vmemmap can be freed for a 32.0 MiB page
    [    0.416416] HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page
    [    0.429764] HugeTLB: 0 KiB vmemmap can be freed for a 64.0 KiB page
    [    0.878108] vcan: Virtual CAN interface driver
    [    1.120395] can: controller area network core
    [    1.129832] can: raw protocol
    [    1.132867] can: broadcast manager protocol
    [    1.910228] pinctrl-single f4000.pinctrl: pin PIN101 already requested by 23110000.pwm; cannot claim for 601000.gpio
    [    4.006117] pinctrl-single 4084000.pinctrl: pin PIN11 already requested by 4201000.gpio; cannot claim for mcu_gpio_key
    [    8.500475] m_can_platform 4e00000.can: sidf 0x0 128 xidf 0x200 64 rxf0 0x400 64 rxf1 0x1600 64 rxb 0x2800 64 txe 0x3a00 32 txb 0x3b00 32



    谢谢。此致、
    Ishan

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Ishan:

    您是否已使用以下命令验证 CAN 通信: https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/10_00_07_04/exports/docs/linux/How_to_Guides/Target/How_to_test_MCAN_on_AM62x.html

    请参阅以下 dtso 文件来创建 CAN 节点、或在 U-boot 提示符下应用它。

    e2e.ti.com/.../2526.k3_2D00_am62x_2D00_sk_2D00_mcan.dtso

    此致、
    Aparna

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    嗨、Aparna、

    感谢重播。

    但我们已经在 GP 器件的 SDK9.0中实现了相同的功能、并且工作非常顺利。

    上述仅使用 FS 器件的响应。

    正如我在问题中提到的、当我们应用 CAN 命令时会看到以下日志。

    root@sm2s-am6254:~# ip link set can0 down
    Cannot find device "can0"
    root@sm2s-am6254:~# ip link set can0 type can bitrate 333333 dbitrate 666666 fd on
    Cannot find device "can0"


    由于我们使用定制电路板、因此我们在器件树中进行了如上所述的更改。

    请引导我们进行同样的操作。


    谢谢。此致、
    Ishan

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Ishan:

    您能否说明一下所使用的 AM62x 器件型号?

    某个变体没有 PRU、需要在设备树中禁用。

    此致、
    Aparna

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    嗨、Aparna、

    使用 AM6254ATGGHAALW 3SPOQLS

    如何检查 PRUSS 是否存在?



    谢谢。此致、
    Ishan

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    请在 Linux 终端上共享以下命令的输出:

    devmem2 0x43000018

    这将显示 CTRL_MMR 寄存器的值、然后我们可根据其值进行确定。

    此致、
    Aparna

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    嗨、Aparna、  

    共享给定 cmd 的输出。

    root@sm2s-am6254:~# devmem2 0x43000018
    /dev/mem opened.
    Memory mapped at address 0xffff9646c000.
    Read at address  0x43000018 (0xffff9646c018): 0x3A24F521
    root@sm2s-am6254:~# 
     



    谢谢。此致、
    Ishan

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Ishan:

    从上面共享的 CTRL_MMR 值来看、位字段[17:13]的值等于00111 = 7

    因此它没有 PRU。 您需要在设备树节点中禁用它。

    此致、
    Aparna