Hi All,
I am working on implementing a power savings schema on our latest design (K60 based) and I have run into an odd behavior. I am using the low power module in MQX 4.0 to accomplish the switching into the various power states.
My entry into VLPR is as follows:
_lpm_set_clock_configuration(BSP_CLOCK_CONFIGURATION_2MHZ);
_lpm_set_operation_mode (LPM_OPERATION_MODE_WAIT);
Nothing too exciting. As expected, the overall current on my boards drops from 88 mA to 3 mA, but the UART does not function as expected. After some chasing I have located the code where the code is hanging, but I have no idea why. If I comment out the code (a hack for testing only), everything works great. Power goes to where I expect and the UART behaves as expected. The suspect code is:
while (0 == (PMC_REGSC & PMC_REGSC_ACKISO_MASK))
{ };
This code is in _lpm_set_cpu_operation_mode.
Obviously I am missing a setup step, I am just not sure what exactly it is!
Any help would be appreciated.
Rob
Hi Rob,
where exactly comes the suspect code from ? If I search MQX 4.0.2 ${MQX_ROOT_DIR}\mqx\source\io\lpm\*.* I will find none occurence of such a code.
Do you generate the power management code using Processor Expert ? Also, there is application note AN4503 which discusses the Kinetis power modes in detail and it mentions the ACKISO bit only for VLLSx modes (entry, exit) but nothing for VLPR.
Hi Martin,
The code that I am referencing is in _lpm_set_operation_mode. It appears the version of MQX we are using (4.0.0) has been modified in our SVN repository. It appears this occurred when we ported the project fro K20 to K60. The lpm_smc file should be used, but instead a modified version of lpm_mc was used.
I am porting over the code from the 4.0.2 patch and seeing what that brings to the table.