S32k144 clock source change

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

S32k144 clock source change

835 Views
vinaykl
Contributor II

Hello team,   

            I want to change the system clock source of my current running configuration. I just saw one API "CLOCK_DRV_SetSystemClock()"

            I just want to know how to use this API and what is the use of it. And I just want to know the arguments I need to pass in this.

Thank you

Vinay

0 Kudos
Reply
3 Replies

762 Views
vinaykl
Contributor II

Hello danielmartynek,

Thank you for the reply, I am using S32K144_SDK 3.0 SDK

 

 

0 Kudos
Reply

723 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @vinaykl,

You would need to define the two parameters in the code.

Their declaration can be found in clock_S32K1xx.h

danielmartynek_0-1695816591865.png

You can use the CLOCK_DRV_GetSystemClockSource() and pass the defined struct there first to get the current clock source. Then change it and use it in CLOCK_DRV_SetSystemClock().

However, the SDK 3.0.0 Processor Expert allows creating more clock configurations.

danielmartynek_1-1695816808207.png

The system clock can be updated using CLOCK_SYS_UpdateConfiguration().

 

Regards,

Daniel

 

 

0 Kudos
Reply

818 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @vinaykl,

Which SDK version do you use?

 

Thanks,

BR, Daniel

0 Kudos
Reply