Hello,
I'm working with x-loader, u-boot and a linux 2.6 kernel on an Am3517-based evaluation board. My goal is to enable the second watchdog.
All three pieces of software disable the second watchdog. I modified x-loader so that it enables it with sufficient period so that the board has enough time to boot and launch the app. I removed the code that disables WDT2 in u-boot, and I configured he Linux kernel so that the watchdog driver is a module. These modifications lead to desired behavior, that is if I don't do anything, WDT2 triggers and the card reboots.
The problem is that the board is not correctly reset: normally, it is supposed to boot from an mmc, and falls back to a nand flash if it fails. When the board reboots due to WDT2, the x-loader from the nand (not the mmc) is launched.
Reset management in WDT2 is quite modular and complex. I have troubles to understand when reading the TRM what can be configured. I would like that a WDT2 reset induce an initialisation of the board as complete as possible (or at least, make it warm-reboot from the mmc, not the nand flash).
What is the correct way to do this?