analogdevicesinc / msdk

Software Development Kit for Analog Device's MAX-series microcontrollers
Apache License 2.0
60 stars 75 forks source link

MAX78000 - Inconsistency between User Guide and SDK #1040

Open alessandro-montanari opened 3 weeks ago

alessandro-montanari commented 3 weeks ago

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

Jake-Carter commented 3 weeks ago

Hi @alessandro-montanari, I will check with our hardware designers and internal tickets to see if there are any known issues with that bit.

At the moment I would say continue to use our existing implementation that writes to the fields directly. This may be a workaround to some issue.

I will let you know what I find