I am using IAR Embedded Workbench and the TWR-KW24D512 Kinetis Board. I am trying to Implement Low Power Mode into the Connectivity Test program, I have had the low power mode working properly in the Wireless Uart code base but when I try to implement it into the connectivity test, the processor will go into low power mode but it will not wake up from low power mode.
I have added the PWRLibrary C file and header file and i have modified the main for the Connectivity test Initialize the low power mode and the wake up source. The code that is used to enter the low power mode is the same as the code from the wireless usat code packet.
The low power mode that I am using is LLS and the wake source that I am using is LPTMR. I am trying to make it so the board will go into low power mode for 5 min
The initialization for the two code packets looks to be the same to me and the low power initialization is the same.
Is there something that i need to add to the Connectivity test so that it will wake from low power mode?
There is not any specific reason or inconvenient to use low power in connectivity test demo at all. You would only need to copy the low power functionality form Wireless UART demo. It seems you could be missing some configurations, maybe regarding clocks or the LLWU.
I would recommend you to start testing the proper switch configuration as wake up source as a start and verify the device wakes up from low power with a button press. Once verified, you could go on and check all timer wake up configuration and test with small timeouts first. If possible, please send your project so we could have a look at it too.
Thank you for your response,
I error in the code was that the Interrupt service routine for the wake up mode was not in the vector table so it was just going to a dummy handler.