AnsweredAssumed Answered

How to use clockMan and pwrMan PE components with debug console

Question asked by Mark Sample on Jun 10, 2016
Latest reply on Jun 14, 2016 by isaacavila

Hello, I'm trying to do some simple clock and power mode changes. I would like to be able to go between Run, HSRun, VLPRun and VLPWait.


Using the FRDM-K22 board, KSDK 1.3, and KDS 3.2. When creating the KDS project I selected the pre-configured "board" file which provided a pre-configured clockMan1 component with 6 clock configurations. Just to get to something that works, I tried to get the current clock configuration using:

ret =  CLOCK_SYS_GetCurrentConfiguration()

and then transitioning to a new clock config using



I do think I am transitioning to the new clock configurations but CLOCK_SYS_GetCurrentConfiguration() always returns zero. Also, the debug console baud rate does not track with the clock configurations. It is supposed to do that. right?


Also trying to change power modes using the pwrMan component to go between Run mode, High speed run mode, Very low power run mode, and Very low power wait mode.


Just to get something working, I tried to get the current power mode configuration using

current_mode = POWER_SYS_GetCurrentMode();

But this never returns anything. Also tried changing the power mode using

ret = POWER_SYS_SetMode()

but I'm not sure if its working because POWER_SYS_GetCurrentMode(); doesn't return anything for me.


I've attached my project. The code in main was just an attempt to get anything to work.

So my questions are:

Q1. How do i get the debug console to have the same baud rate when jumping between Run, HSRun and VLPRun?

Q2. Why does CLOCK_SYS_GetCurrentConfiguration() always return zero.

Q3. Why does POWER_SYS_GetCurrentMode() seem not to return anything?

Q4. Is it possible to take what I have there, delete my code in main, and write a few line of code that shows how to transition between clock and power modes and have the debug console baud rate also track with the changes?


Thank you in advance!


Best Regards,


Original Attachment has been moved to: