PeX CPU Clock Configurations, the Clock Manager, and the Power Manager

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PeX CPU Clock Configurations, the Clock Manager, and the Power Manager

Jump to solution
2,843 Views
larrykoos
Contributor III

I'm using KDS 2.0.0 and MQX KSDK 1.1.0.

 

With ProcessorExpert (PeX), one creates clock configurations in the CPU component and picks one of them as the initial configuration. I'm now trying to use the Power Manager to transition from RUN to VLPR states, but it is not clear which PeX 1component you use to create the clock configurations used by the Power Manager and Clock Manager. In fact, I cannot find in the PeX environment where to create multiple clock configurations that are reference-able from the clock/power manager source code.

 

Can someone explain the correct process for creating these configurations and how to make them reference-able?

Labels (1)
0 Kudos
1 Solution
2,195 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hi Larry,

"the macros it defines are only used to determine the initial clock settings when the cpu first boots."     YES.

And about configuration the clock on code, we can call the KSDK functions , while the parameter need configuration

by ourselves according our demand .

pastedImage_0.png

Best Regards,

Alice

------------------------------------------------------------------------------------------

If this post answers your question, please click the Correct Answer button.

-----------------------------------------------------------------------------------

If this post help your question, please click the helpful Answer button.

View solution in original post

0 Kudos
16 Replies
2,194 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hi Larry,

About the VLPR , you can configuration here :

And about the introduce of the configuration , you can refer to " right click the CPU component -> help on  component -> Component  xxxx MCUInit" , then you can find :

pastedImage_1.png

Hope it helps

Alice

0 Kudos
2,194 Views
larrykoos
Contributor III

You must not be using the same tool version as I am. When I right click on the CPU component and follow the help screens, I get to the following screen that is similar, but not the same:

pastedImage_3.png

As I said in the original post, I'm using KDS 2.0.0 and MQX KDSK 1.1.0.

Also, while the help screen refers to SetClockConfiguration, there is no method with that name under the CPU component. There is one called CLOCK_SYS_setConfiguration under the clock manager component, but I don't see the connection between the clock configurations defined in the CPU component and the methods defined in the clock manager.

0 Kudos
2,194 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hi Larry,

Yes , i used  the version as you .

And please tell me the cpu you use ?

BR

Alice

0 Kudos
2,194 Views
larrykoos
Contributor III

MK64F12

0 Kudos
2,194 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hi Larry,

Please drag down,  see if have . wait your result.

pastedImage_0.png

pastedImage_0.png

Best Regards

Alice

0 Kudos
2,194 Views
larrykoos
Contributor III

I don't have a problem finding the documentation you reference. My problem is that none of the methods referred to in the documentation exist in the CPU component. This includes SetClockConfiguration() and VLPModeDisable().

0 Kudos
2,194 Views
adriancano
NXP Employee
NXP Employee

Hi,

I am afraid that you did not configure a PEx + KSDK project. The project you have is a PEx project which uses the LDD drivers and not the KSDK drivers.

You can find information about those methods in the KDS 2.0.0 installation folder <install_folder>\KDS_2.0.0\eclipse\ProcessorExpert\Help there you can find the PEXDRVSPEXUG pdf file that has the complete information about the CPU methods in Processor Expert using the LDD drivers.

If you want to know the difference between a just PEx project and a PEx + KSDK project check this thread SDK vs PDD(without SDK)


Hope this information can help you.

Best Regards,
Adrian Sanchez Cano
Technical Support Engineer
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
2,194 Views
larrykoos
Contributor III

The project was created as a PeX + KSDK project under KDSK 1.0.0beta and then upgraded to KDSK 1.1.0 when it became available. To verify this, I just create a new project which I called junk as a PeX + KSDK project and the resulting CPU component options are the same. What were you looking at to decide that it wasn't?

0 Kudos
2,194 Views
adriancano
NXP Employee
NXP Employee

Hi,

As colleague Alice Yang mentioned the SetClockConfiguration() method is related to a just PEx project. When using a PEx + KSDK method the corresponding method is CLOCK_SYS_SetConfiguration. You can check an example about the power manager in the KSDK_1.1.0 installation folder following the path <install_folder>\KSDK_1.1.0\demos\power_manager_demo.

The example is not set with PEx expert but uses the KSDK drivers it will help you to understand how to use the power_manager driver.


Hope this information can help you.

Best Regards,
Adrian Sanchez Cano
Technical Support Engineer
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
2,194 Views
larrykoos
Contributor III

Adrian and Alice,

Thanks for the responses.

As I said in an earlier reply, I am aware of the CLOCK_SYS_* functions in the Clock Manager Component. I am also aware of the clock configurations that Alice mentioned in her last reply. Unfortunately, I do not believe the ones she refers to are generated from the clock configurations tab in the CPU component. I believe they are just the default configurations built into the driver code. My question is:

Does the PeX+KDSK tool generate a table of clock configurations from the CPU component and where in the Generated_Code directory can this table be found?

I don't think the tool generates this table.

0 Kudos
2,194 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hi Larry,

After you configuration the VLPR mode , you can find the code on the "SystemInit()" function, here:

pastedImage_0.png

the actual configuration code about the clock register is in the "system_MK64F12.h", here:

pastedImage_1.png

after you change your configuration of PE, you can find these are changed according your configrate.

Best Regards,

Alice

------------------------------------------------------------------------------------------

If this post answers your question, please click the Correct Answer button.

-----------------------------------------------------------------------------------

If this post help your question, please click the helpful Answer button.

0 Kudos
2,192 Views
larrykoos
Contributor III

Alice,

Thank you for taking the time to respond but you are not answering my questions:

1) Does the PeX+KDSK tool generate a table of clock configurations from the CPU component?

2) If the answer to question 1 is Yes, where in the Generated_Code directory can this table be found?

The file you reference in your reply, system_MK64F12.c, is not autogenerated and has nothing to do with the clock configurations from the CPU component.

Thanks again for your help.

0 Kudos
2,194 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hi Larry,

Yes, i said above is the CPU component generated code .

Now,  let's do a comparison configurate to the CUP, then check the generate code, we will find the difference.

Below is configrate to  FEI mode,

pastedImage_0.png

pastedImage_1.png

pastedImage_7.png

Please compare these with my last reply screenshot, the last screenshot is configurarte to VLPR mode.

And that, you can configurate by yourself , then check the file I told you .

In a word , the code through change the macro of "system_MK64F.h" ( change the register in fact )  to change the CPU configuration.

BR

Alice

0 Kudos
2,194 Views
larrykoos
Contributor III

Alice,

I agree the system_MK64F12.h file is autogenerated, but the macros it defines are only used to determine the initial clock settings when the cpu first boots. There are no clock configuration tables generated from the CPU component clock configurations that can be used in calls to the clock manager. Do you agree?

0 Kudos
2,196 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hi Larry,

"the macros it defines are only used to determine the initial clock settings when the cpu first boots."     YES.

And about configuration the clock on code, we can call the KSDK functions , while the parameter need configuration

by ourselves according our demand .

pastedImage_0.png

Best Regards,

Alice

------------------------------------------------------------------------------------------

If this post answers your question, please click the Correct Answer button.

-----------------------------------------------------------------------------------

If this post help your question, please click the helpful Answer button.

0 Kudos
2,194 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hi Larry,

The function of the "help on component " (such as SetClockConfiguration() ) is the function of PE, not KSDK.

We only can refer to it cofiguration the PE-KSDK .

And the clock related function is in the "fsl_clock_MK64F12" file.

After I configuration to VLPR mode, the genereted code is like this :

pastedImage_0.png

Best Regards

Alice

0 Kudos