I'm using ProcessorExpert 10.2.0 for Kinetis TWR-KL25.
I tried to use LLWU interrupt, but there is no LLWU component in PEx.
So I tried to initialize LLW interrupt by using InterruptVector component from "CPU Internal Peripherals" -> "Peripheral Initialization" -> "Interrupt Vector".
When the project DOES NOT include MQX Lite, I could configure InterruptVector component with vector=INT_LLW, and generate code.
However when MQX Lite is included in the project, it fails to generate code as error message below.
Generator: FAILURE: at line 248: Unexpected status, please contact Freescale support. (file: Drivers\sw\RTOSAdaptor\Common_RTOSAdaptor.prg)
The same error happens when I tried different interrupt vector, such as UART2.
I attached screenshot of PEx just for reference.
Solved! Go to Solution.
Hi,
It seems to be a bug, I'll check that. However, it's not necessary to do it this way. LLWU is handled directly by the CPU component.
Please switch to the Expert view mode by clicking on the 'Expert' button in the inspector. This way all possible settings are visible.
The LLWU is configures in the CPU component property group Low power mode settings / LLWU settings. Enable this group and you can enable the wakeup sources and enable the interrupt request.
There is an event which is generated when the LL modes and the interrupt are enabled:
In Processor Expert, all the low leakage stop modes are handled by STOP operation mode. You need to define in the CPU component which stop mode is to be used.
For example:
Then in your code, you call the Cpu_SetOperationMode method to go into sleep, for example:
...
Cpu_SetOperationMode(DOM_STOP, NULL, NULL);
...
In this place your code freezes and after waking up the CPU goes into the OnLLSWakeuINT event.
In that event routine, you should as soon as possible switch back to RUN operation mode and then do what you want:
...
Cpu_SetOperationMode(DOM_RUN, NULL, NULL);
...
best regards
Petr Hradsky
Processor Expert Support Team
Hi,
It seems to be a bug, I'll check that. However, it's not necessary to do it this way. LLWU is handled directly by the CPU component.
Please switch to the Expert view mode by clicking on the 'Expert' button in the inspector. This way all possible settings are visible.
The LLWU is configures in the CPU component property group Low power mode settings / LLWU settings. Enable this group and you can enable the wakeup sources and enable the interrupt request.
There is an event which is generated when the LL modes and the interrupt are enabled:
In Processor Expert, all the low leakage stop modes are handled by STOP operation mode. You need to define in the CPU component which stop mode is to be used.
For example:
Then in your code, you call the Cpu_SetOperationMode method to go into sleep, for example:
...
Cpu_SetOperationMode(DOM_STOP, NULL, NULL);
...
In this place your code freezes and after waking up the CPU goes into the OnLLSWakeuINT event.
In that event routine, you should as soon as possible switch back to RUN operation mode and then do what you want:
...
Cpu_SetOperationMode(DOM_RUN, NULL, NULL);
...
best regards
Petr Hradsky
Processor Expert Support Team
Thank you. I've just figured out PEx has LLWU/LLS settings in CPU properties and confirmed KL25 can be wake up from LLS state by SW4.