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.

[参考译文] AM62A7-Q1:看门狗:使用/dev/watchdog1时、电路板不't RESET

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

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1502656/am62a7-q1-watchdog-board-doesn-t-reset-when-using-dev-watchdog1

器件型号:AM62A7-Q1
主题:AM62A7中讨论的其他器件

工具/软件:

您好、 Nick Saulnier

我有一个带有 AM62A7 SoC 的定制电路板。 我们使用 SDK 10.1.0中的内核/u-boot (经过 phytec 和 ourself 的修改)。

我的问题如下:

  1. systemd 正在服务/dev/watchdog0. 它主要用于检查重启是否正常工作、我希望保留该功能。
    如果我停止服务/dev/watchdog0 (例如调用 gdb -p 1)、则主板会正确地重新启动。
  2. 我想使用/dev/watchdog1转/dev/watchdog3 (MAIN_rti1转 MAIN_rti3)、在某些情况下强制进行看门狗复位。
    当我尝试这样做时、看门狗会递减计数、但不会在 ESM 中触发复位
    root@4kcam-protoa:~# wdctl /dev/watchdog1 ; sleep 61 ; wdctl /dev/watchdog1
    [  106.551789] watchdog: watchdog1: nowayout prevents watchdog being stopped!
    [  106.558816] watchdog: watchdog1: watchdog did not stop!
    Device:        /dev/watchdog1
    Identity:      K3 RTI Watchdog [version 0]
    Timeout:       60 seconds
    Timeleft:      33 seconds
    Pre-timeout:    0 seconds
    FLAG           DESCRIPTION           STATUS BOOT-STATUS
    KEEPALIVEPING  Keep alive ping reply      1           0
    [  167.582200] watchdog: watchdog1: nowayout prevents watchdog being stopped!
    [  167.589160] watchdog: watchdog1: watchdog did not stop!
    Device:        /dev/watchdog1
    Identity:      K3 RTI Watchdog [version 0]
    Timeout:       60 seconds
    Timeleft:       0 seconds
    Pre-timeout:    0 seconds
    FLAG           DESCRIPTION           STATUS BOOT-STATUS
    KEEPALIVEPING  Keep alive ping reply      1           0

我的问题:

  1. 看门狗器件/dev/watchdog1到/dev/watchdog4是否应该正常工作?
  2. 如何使/dev/watchdog1到/dev/watchdog4重置我的电路板?

谢谢、

Bas Vermeulen

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

    您好、Bas、

    如果您尚未对 uboot 代码进行一些修改、您应该对该代码进行一些修改。

    当看门狗超时时、它会向 ESM 生成一个中断。 然后、ESM 负责复位处理器。

    我们打算在 SDK 10.0中添加对看门狗复位 AM62Ax 的支持、但这需要修复 ESM 中断输入、并且该修复不会将其放入 SDK 10.0或 SDK 10.1中。 请在此处找到修复程序: https://software-dl.ti.com/processor-sdk-linux/esd/AM62AX/10_01_00/exports/docs/linux/Foundational_Components fix/Kernel/sdk/watchdog.html#fix-for-10-0-sdk Kernel_Drivers

    此致、

    Nick

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

    您好、Nick、

    这些更改已对我的代码库进行。 如果我使用/dev/watchdog0、它可以正常工作、但如果我尝试使用/dev/watchdog1、则无法重新启动电路板。 它正确地倒计时、但 ESM 不会像/dev/watchdog0那样触发复位。

    此致、

    Bas

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

    另一个问题是 AM62A 平台是否设置为使用上电原因存储器区域? 我需要在软件中考虑启动原因、这符合要求。

    此致、

    Bas

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

    对此有任何更新? 仍然无法让其他看门狗重新启动我的电路板。

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

    您好、Bas、

    我想在看门狗事件触发后检查您的 ESM 寄存器、以查看是否有任何变化(还想确保正确配置输入)、但最重要的是、我不知道要查看哪些寄存器。 如果明天没有响应、请再次 ping 该线程。

    我可以帮您创建另一个主题来解决加电存储器区域相关问题吗? 这样、该讨论就不会在看门狗线程中丢失。

    此致、

    Nick

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

    Nick Saulnier

    根据请求 ping 线程。

    Bas

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

    您好、Bas、

    进行了一些初始测试。

    AM62x SDK 10.1 (完整性检查):我能够从所有5个 watchdog0-watchdog4实例重置电路板:
    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1484145/processor-sdk-am62x-watchdog-issues-on-am62x-custom-board-based-on-am62x-sk-board/5799693#5799693

    AM62Ax Linux SDK 11.x 内部构建(健全性检查、应该具有未在 SDK 10.0和 SDK 10.1中应用的补丁):  我能够从所有5个 watchdog0-watchdog4实例重置电路板:

    root@am62axx-evm:~# echo 1 > /dev/watchdog
    watchdog   watchdog0  watchdog1  watchdog2  watchdog3
    root@am62axx-evm:~# echo 1 > /dev/watchdog3
    root@am62axx-evm:~# [   37.554134] watchdog: watchdog3: nowayout prevents watchdog being stopped!
    [   37.554151] watchdog: watchdog3: watchdog did not stop!
    
    root@am62axx-evm:~# uname -a
    Linux am62axx-evm 6.12.17-ti-rt-00771-gc85877d40f8e #1 SMP PREEMPT_RT Tue Mar 25 12:45:29 UTC 2025 aarch64 GNU/Linux
    root@am62axx-evm:~#
    U-Boot SPL 2025.01-00406-gcd91d7360181 (Mar 25 2025 - 16:14:37 +0000)
    SYSFW ABI: 4.0 (firmware rev 0x000b '11.0.7--v11.00.07 (Fancy Rat)')
    SPL initial stack usage: 13568 bytes
    Trying to boot from MMC2
    Authentication passed
    

    AM62Ax Linux SDK 10.1:

    只要进行零修改、就不会对任何看门狗实例进行复位。  

    root@am62axx-evm:/opt/edgeai-gst-apps# uname -a
    Linux am62axx-evm 6.6.58-ti-01497-ga7758da17c28-dirty #1 SMP PREEMPT Wed Nov 27 13:23:15 UTC 2024 aarch64 GNU/Linux
    root@am62axx-evm:/opt/edgeai-gst-apps# echo 1 > /dev/watchdog
    watchdog   watchdog0  watchdog1  watchdog2  watchdog3
    root@am62axx-evm:/opt/edgeai-gst-apps# echo 1 > /dev/watchdog3
    [   78.373044] watchdog: watchdog3: nowayout prevents watchdog being stopped!
    [   78.379936] watchdog: watchdog3: watchdog did not stop!
    
    // watchdog3 does not time out the processor
    
    root@am62axx-evm:/opt/edgeai-gst-apps# echo 1 > /dev/watchdog0
    [  180.885081] watchdog: watchdog0: nowayout prevents watchdog being stopped!
    [  180.891976] watchdog: watchdog0: watchdog did not stop!
    

    我们应该肯定能够使用 ti-linux-kernel 和 ti-u-boot 上用于 SDK 11.x 的代码版本作为参考、因为内部 SDK 11.x 构建工作正常:
    https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/?h=ti-linux-6.12.y-cicd
    https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/?h=ti-u-boot-2025.01 

    此致、

    Nick

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

    您好、Nick、

    AM62A 上的10.1是否支持 https://software-dl.ti.com/processor-sdk-linux/esd/AM62AX/10_01_00/exports/docs/linux/ESM/Kernel/ESM/Watchdog.html#fix-for-10-0-SDK 中对 Foundational_Components 节点的更改 Kernel_Drivers

    我刚刚迁移到10.1、我不能完全确定何时会转到11.x 我已经从上面的链接添加了正确的 ESM IRQ。

    此致、

    Bas

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

    您好、Bas、

    没有时间进行构建和硬件测试。

    我花了一些时间通过 TRM、寻找可以在哪里验证 ESM 输入中断配置。 仍然可以确定要检查哪些寄存器。

    我们尚未发布公共 AM62Ax SDK 11、 计划在7月/8月发布 AM62Ax SDK 11.1。

    比较 SDK 10.1与内部 SDK 11

    TI-u-boot-2025.01是 SDK 11中将包含的版本。 在我的脑海中、我没有看到与 ti-u-boot-2025.01而非 ti-u-boot-2024.04中的 ESM 或看门狗相关的任何明显信息。

    在 ti-u-boot-2025.01中、uboot 将共享的 Linux/uboot 器件树文件移动到 DTS/Upstream / src。 因此、您可以在此处找到更新后的 ESM 节点:
    https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/dts/upstream/src ti/arm64/ti/k3-am62a-main.dtsi?h=ti-u-boot-2025.01#n287

    在提交消息中搜索看门狗、ESM、RTI 时、我看不到与2015.01版而非2024.04版 AM62*器件相关的任何提交。

    此致、

    Nick

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

    我拥有的 ESM 节点是:

    内核:

            main_esm: esm@420000 {
                    compatible = "ti,j721e-esm";
                    reg = <0x0 0x420000 0x0 0x1000>;
                    /* Interrupt sources: rti0, rti1, wrti0, rti4, rti2, rti3 */
                    ti,esm-pins = <192>, <193>, <195>, <204>, <209>, <210>;
                    bootph-pre-ram;
            };

    U-boot:

            main_esm: esm@420000 {
                    compatible = "ti,j721e-esm";
                    reg = <0x0 0x420000 0x0 0x1000>;
                    ti,esm-pins = <192>, <192>, <195>, <204>, <209>, <210>;
                    bootph-pre-ram;
            };

    它与您发送的链路中的节点基本相同:

    	main_esm: esm@420000 {
    		compatible = "ti,j721e-esm";
    		reg = <0x0 0x420000 0x0 0x1000>;
    		bootph-pre-ram;
    		/* Interrupt sources: rti0, rti1, wrti0, rti4, rti2, rti3 */
    		ti,esm-pins = <192>, <193>, <195>, <204>, <209>, <210>;
    	};

    这不应该是问题所在。

    此致、

    Bas Vermeulen

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

    刚刚在 u-boot ESM 节点中看到了一个问题(192,192、而不是192,193)。 我来修复一下、看看这样是否能解决问题。

    Bas

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

    这就是问题所在、天哪。 抱歉、在 u-boot 器件树中修复中断源后、它按预期工作。

    结果只有/dev/watchdog1不起作用。 这是我以前用来测试的。

    道歉。

    Bas

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

    您好、Bas、

    啊、这总是令人沮丧。 但我很高兴听到现在的事情正在按照你的预期工作! 这会腾出一些时间在我这边看看你的另一个线程今天或明天. 如果您在一天左右内没有看到其他回复、请保持发送的 ping。

    此致、

    Nick

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

    我将在本周离线、但如果没有响应、我将在下周星期二 ping 您。

    Bas