msdk icon indicating copy to clipboard operation
msdk copied to clipboard

MAX78000 - Inconsistency between User Guide and SDK

Open alessandro-montanari opened this issue 8 months ago • 1 comments

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

alessandro-montanari avatar Jun 10 '24 10:06 alessandro-montanari