msdk
msdk copied to clipboard
MAX78000 - Inconsistency between User Guide and SDK
Hello,
I'm working on low power modes and wakeup on MAX78000 and I noticed that the user guide says to write 1 to the lpwkst_clr field on register PWRSEQ_LPCN
to clear the wakeup status flags (PWRSEQ_LPWKST0
, PWRSEQ_LPWKST1
, ...).
However, in the SDK (Libraries/PeriphDrivers/Source/LP/lp_ai85.c) the function (MXC_LP_ClearWakeStatus()
) clears them by writing all 1s into the registers directly.
I tried to modify the function with this line MXC_PWRSEQ->lpcn |= MXC_F_PWRSEQ_LPCN_LPWKST_CLR;
but it seems to have bricked my device. I couldn't reset it or re-flash it. I had to remove power to it and then it came back.
What is the best way to clear those registers? Thanks