Hello!
Is anyone else out there more familiar with SDK framework who can tell me what is the difference between my code and the power_manager_hal_demo?
Basically, I have to run the power_manager_hal_demo before I run my code, after a power-off, to get my code to go to the VLLSx modes. I have compared as many registers as I can between the two sets of codes and don't see any differences. There must be some kind of register that is getting set in the power_manager_hal_demo code that my code does not set.
Here is what I know:
1. Once I run the power_manager_hal_demo, I can run my code without any problems and I can get into all the power modes as I expect. This means that whatever register is getting set, stays set between resets and code-downloads.
2. It is not clearing the PMC_REGSC_ACKISO bit, because I am doing that.
3. It is not related to the SMC_PMPROT bits because they are being set correctly.
4. I thought it was going to be the errata pertaining to the RTC flag. Enabling the RTC clock gate, disabling the time counter, clearing the RTC_SC[TIF] flag and then disabling the RTC clock gate does have an effect. It doesn't allow me to go to the low power mode that I select...it goes to 1.7mA, then immediately wakes up, as if triggered by an interrupt or something. It is not the interrupts that I have set, I have confirmed this. So...I'm not sure what the RTC bit of code is doing. It had an effect, but did not solve the problem.
Does anyone else have any ideas?
Thanks,
Sara