When HAL apis for RT6xx PMC (power management controller), please include methods to read and clear the Wakeup, Interrupt, and Reset "FLAGS" register. Application firmware needs to read and clear this register for debug and diagnostic purposes.
Snip from UM11147
