I try to detect last reset reason in u-boot.
I use iMX6UL-evk evaluation board, default configs for u-boot and buildroot for this board.
To test last reason reset feature I folow these steps:
1) Booting in buildroot.
2) Disabling watchdog daemon.
3) Board resets on watchdog timeout.
In U-boot debug I can see reset reason "Reset cause: POR", and it does not change even if the reset occurred due to a watchdog timeout. To detect reset cause u-boot reads "SRC Reset Status Register (SRC_SRSR)".
I have written u-boot module which reads " Watchdog Reset Status Register (WDOGx_WRSR)", and it tells same (POR reason)
Do I need to do something to detect reset reason?