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: Watchdog issue on SDK 10.0.0

Part Number: AM62A7

Tool/software:

Hi,

SDK: 10.0.0

EVM: AM62A-SK

I am trying to use the watchdog on AM62A-SK evm but watchdog is not working. Board is not getting reset after 60 seconds. Please check my previous thread on watchdog here.

I did changes as mentioned here for 10.0.0 SDK. But still watchdog is not working on EVM. Please check my logs below.

root@am62axx-evm:~#
root@am62axx-evm:~#  rmmod rti_wdt
root@am62axx-evm:~#
root@am62axx-evm:~#
root@am62axx-evm:~#
root@am62axx-evm:~# modprobe rti_wdt heartbeat=10
root@am62axx-evm:~#
root@am62axx-evm:~#  echo 1 > /dev/watchdog
root@am62axx-evm:~#
root@am62axx-evm:~#  devmem2 0x0E000098
/dev/mem opened.
Memory mapped at address 0xffffbd4a4000.
Read at address  0x0E000098 (0xffffbd4a4098): 0x00000000
root@am62axx-evm:~#
root@am62axx-evm:~#
root@am62axx-evm:~# uname -r
6.6.32-ti-01301-gdb8871293143-dirty
root@am62axx-evm:~# uname -a
Linux am62axx-evm 6.6.32-ti-01301-gdb8871293143-dirty #1 SMP PREEMPT Thu Aug  1 19:10:56 UTC 2024 aarch64 GNU/Linux
root@am62axx-evm:~#
root@am62axx-evm:~#  devmem2 0x0E000098
/dev/mem opened.
Memory mapped at address 0xffff954d3000.
Read at address  0x0E000098 (0xffff954d3098): 0x00000032
root@am62axx-evm:~#
root@am62axx-evm:~#

Please do needful to enable the watchdog on EVM.

Regards,

Jay

  • Hello Jay,

    I remember that I had a bit of trouble getting the AM62Ax watchdog fix working on AM62Ax the first time as well. I eventually got it working, but right now I am having trouble remembering what the issue was... I think what happened is that I generated the tiboot3-<board>-evm.bin file and copied it to the SD card, but my new tiboot3 file was not actually getting loaded - the existing tiboot3.bin file was getting loaded instead.

    In case you are running into the same thing, please rename your new file to tiboot3.bin in the boot partition to make sure your uboot changes are getting applied.

    If that IS the issue you are running into, I have a bug filed against the SDK's uboot documentation to add this information in SDK 10.1 to page https://software-dl.ti.com/processor-sdk-linux/esd/AM62AX/10_00_00/exports/docs/linux/Foundational_Components/U-Boot/UG-General-Info.html

    Regards,

    Nick

  • Hello Nick,

    I am working with Jay. We are using yocto-build system to build the changes. We are using EMMC based boot-system on EVK. We are copying direct tiboot3.bin on board from build-directory after build.

    Please check below details.

    1) Linux kernel build:(k3-am62a7-sk.dtb, Image)

    MACHINE=am62axx-evm bitbake linux-ti-staging-rt -c compile -f
    MACHINE=am62axx-evm bitbake linux-ti-staging-rt -c deploy -f

    Source-Path: build/arago-tmp-default-glibc/work/am62axx_evm-oe-linux/linux-ti-staging/6.6.32+git/git
    Patch: linux_kernal_change_25_11.patch

    2) U-boot build:(u-boot.img, tispl.bin)

    MACHINE=am62axx-evm bitbake u-boot-ti-staging-rt -c compile -f
    MACHINE=am62axx-evm bitbake u-boot-ti-staging-rt -c deploy -f

    Source-Path: build/arago-tmp-default-glibc/work/am62axx_evm-oe-linux/u-boot-ti-staging/2024.04+git/git
    Patch: uboot_changes_25_11.patch


    3) tiboot3 build:(tiboot3.bin, tiboot3-am62ax-hs-fs-evm.bin)

    MACHINE=am62axx-evm bitbake mc:k3r5:u-boot-ti-staging -c compile -f
    MACHINE=am62axx-evm bitbake mc:k3r5:u-boot-ti-staging -c deploy -f


    Source-Path: build/arago-tmp-default-baremetal-k3r5/work/am62axx_evm_k3r5-oe-eabi/u-boot-ti-staging/2024.04+git/git
    Patch: tiboot3_changes_25_11.patch

    Patch-Zip-File.zip

    On Board Details; Where we replace the images after changes in u-boot and kernel.

    Md5sum check on board and build-images from build directory and compare.

      

    Please check above details and let us know if we missed anything in applying changes, image building, image copying or in validation process on board.

    We are waiting for your response on this.

    Thanks,

    Nisarg

  • Hello Nisarg,

    Thank you for the detailed notes. I am running out of time in the workday, but I will take a look tomorrow and get back to you.

    Regards,

    Nick

  • Hello Nick,

    Please check additional log details for the watchdog.

    Command:- 

    /* WatchDog-0 */

    echo 1 > /dev/watchdog0

    devmem2 0x0e000098

    wdctl /dev/watchdog0

    root@am62axx-evm:~#
    root@am62axx-evm:~#
    root@am62axx-evm:~# wdctl /dev/watchdog0
    Device:        /dev/watchdog0
    Identity:      K3 RTI Watchdog [version 0]
    Timeout:       60 seconds
    Timeleft:      60 seconds
    Pre-timeout:    0 seconds
    FLAG           DESCRIPTION           STATUS BOOT-STATUS
    KEEPALIVEPING  Keep alive ping reply      1           0
    root@am62axx-evm:~# devmem2 0x0e000098
    /dev/mem opened.
    Memory mapped at address 0xffff93794000.
    Read at address  0x0E000098 (0xffff93794098): 0x00000000
    root@am62axx-evm:~#
    root@am62axx-evm:~# echo 1 > /dev/watchdog0
    root@am62axx-evm:~#
    root@am62axx-evm:~# devmem2 0x0e000098
    /dev/mem opened.
    Memory mapped at address 0xffff86248000.
    Read at address  0x0E000098 (0xffff86248098): 0x00000000
    root@am62axx-evm:~# devmem2 0x0e000098
    /dev/mem opened.
    Memory mapped at address 0xffff8590a000.
    Read at address  0x0E000098 (0xffff8590a098): 0x00000000
    root@am62axx-evm:~# wdctl /dev/watchdog0
    Device:        /dev/watchdog0
    Identity:      K3 RTI Watchdog [version 0]
    Timeout:       60 seconds
    Timeleft:      41 seconds
    Pre-timeout:    0 seconds
    FLAG           DESCRIPTION           STATUS BOOT-STATUS
    KEEPALIVEPING  Keep alive ping reply      1           0
    root@am62axx-evm:~# wdctl /dev/watchdog0
    Device:        /dev/watchdog0
    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
    root@am62axx-evm:~# devmem2 0x0e000098
    /dev/mem opened.
    Memory mapped at address 0xffff95938000.
    Read at address  0x0E000098 (0xffff95938098): 0x0000003A
    root@am62axx-evm:~#
    root@am62axx-evm:~#
    root@am62axx-evm:~#
    root@am62axx-evm:~# wdctl /dev/watchdog0
    Device:        /dev/watchdog0
    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
    root@am62axx-evm:~#
    root@am62axx-evm:~#
    root@am62axx-evm:~# devmem2 0x0e000098
    /dev/mem opened.
    Memory mapped at address 0xffffb1b93000.
    Read at address  0x0E000098 (0xffffb1b93098): 0x0000003A
    root@am62axx-evm:~#
    root@am62axx-evm:~# uname -a
    Linux am62axx-evm 6.6.32-ti-01301-gdb8871293143-dirty #1 SMP PREEMPT Thu Aug  1 19:10:56 UTC 2024 aarch64 GNU/Linux
    root@am62axx-evm:~#
    

    Thanks,

    Nisarg

  • Hello Nick,

    Any update on it ? Please provide details on above issue.

    Thanks,

    Nisarg

  • Hello Nisarg,

    Apologies for the delayed response - started writing this reply last night and had to pivot away. To set expectations, I am on vacation today and the rest of the week, so you will not see any more replies from me until next week.

    Your patches look fine to me.

    I am not very familiar with the yocto build process, so I am unable to comment on what steps are needed there (usually I just build the kernel & uboot as described in our SDK docs here):
    https://software-dl.ti.com/processor-sdk-linux/esd/AM62AX/10_00_00/exports/docs/linux/Foundational_Components/U-Boot/UG-General-Info.html
    https://software-dl.ti.com/processor-sdk-linux/esd/AM62AX/10_00_00/exports/docs/linux/Foundational_Components_Kernel_Users_Guide.html#overview

    When I validated the documentation steps, I used the AM62Ax SK with the build steps outlined above.

    How to double-check the applied Linux devicetree settings

    One thing that you could to do double-check the generated Linux .dtb file (not sure how to double-check the uboot outputs) is to investigate the devicetree settings that are actually applied at boot time, and make sure that the ESM node has the expected settings.

    The applied devicetree node settings will be under
    /sys/firmware/devicetree/

    Finding the exact path to the devicetree nodes is tricky. I suggest finding the symbolic link over here first, and that will point you to the full path to the esm node:
    /sys/firmware/device/tree/base/__symbols__/

    If things are still not working for you, next week I can re-validate the AM62Ax steps and tell you exactly what I did. 

    The other thing to keep in mind is that the SDK 10.1 version of Linux SDK will come out in December. All the code is already in the ti-linux-kernel repo, including the patches so that you don't need to make the modifications documented in the AM62Ax SDK docs. You could also try just grabbing the latest ti-linux-kernel-cicd branch and seeing that works better.

    Regards,
    Nick

  • Hello Nick,

    We have verified the ESM node address in dtb and on target board. devicetree settings are successfully applied at boot time. Please check below details.
           


    Regards,
    Parikshit

  • Hello Nick,

    Any update in this watchdog issue? Please provide details on it asap.

    Regards,
    Parikshit

  • Hello Nick,

    Waiting for your update in watchdog issue? Please provide details on it asap.

    Regards,
    Parikshit

  • Hello Parikshit,

    Apologies for the delayed responses here.

    To confirm, is your screenshot on the left from inspecting the .dtb file? I would like you to actually go to 
    /sys/firmware/devicetree/bus.../etc/etc/
    and manually verify the settings there.

    I have seen issues where a different .dtb file is loaded than people expect, so I want to verify the actual applied settings.

    Regards,

    Nick

  • Hello Nick,

    Thanks for the reply,

    We have checked at the path "/sys/firmware/devicetree/base/bus@f0000/" and confirmed that all watchdog nodes are present.

    Additionally, we have checked all parameters under each watchdog node, and their respective values:
        

    Moreover, we have converted .dtb present in our board to .dts using command:"dtc -I dtb -O dts <your DTB> -o <dts filename>".

    Attaching same for your reference
    0246.k3-am62a7-sk.zip

    Kindly check above details and let us know if any issue in shared details or something missing in dtb node.

    Please let us know if we need to check more details on board apart from this for the watchdog node. Please provide exact details in which path we need to validate settings for watchdog (for manual validation)

    We are waiting for your response on this.


    Regards,
    Parikshit

  • Hello Parikshit,

    I wanted you to verify the updated ESM settings were actually applied under /sys/firmware/etc.

    Basically, make sure that the changes here:
    https://software-dl.ti.com/processor-sdk-linux/esd/AM62AX/10_00_00/exports/docs/linux/Foundational_Components/Kernel/Kernel_Drivers/Watchdog.html#fixes-for-10-0-sdk

    are actually getting reflected.

    Regards,

    Nick

  • Hello Nick,

    We have verified that the changes have been successfully applied, as previously shared with you. here.


    Please refer to the attached image, which displays the node details from the updated .dtb file reflecting the ESM settings. These updates, based on the documentation available at https://software-dl.ti.com/processor-sdk-linux/esd/AM62AX/10_00_00/exports/docs/linux/Foundational_Components/Kernel/Kernel_Drivers/Watchdog.html#fixes-for-10-0-sdk 


    If there are additional methods to verify whether the changes have been applied, we kindly request you to share them with us.

    Best regards,
    Parikshit

  • Hello Nick,

    Any update in this watchdog issue? Please provide details on it asap.

    Regards,
    Parikshit

  • Hello Nick,

    Any update in this watchdog issue? We are waiting for your reply, please provide details on it asap.

    Regards,
    Parikshit

  • Hello Nick,

    Any update in this watchdog issue? Please provide details on it asap.

    Regards,
    Parikshit