CLKOUT pin configuration

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

CLKOUT pin configuration

2,551 Views
rajesh057
Contributor III

hi ,

I am using S32K144 microcontroller I have configure core clock with 80MHz and bus clock with 40MHz ,I would like to see my clock speed in oscilloscope ..with the help of CLKOUT pin pls any one suggest me how to configure. Any way to cross check my clock frequency .

Thanks for helping

Rajesh Kota  

Labels (1)
12 Replies

2,027 Views
jiri_kral
NXP Employee
NXP Employee

Hi, 

if you are using SDK - you can enable clockout and source in Clock Manager module: 

pastedImage_1.png

Also don't forget select pin functionality in PinMux: 

pastedImage_2.png

Hope it helps. 

Jiri 

2,027 Views
rajesh057
Contributor III

clkout.GIFpinmux.GIF

if you see blow code I have added clock_sys_init(),clock_sys_updateconfig(),functions I used as per example ....when I call

pins_drv_int() function its not coming out ..clock.GIF

0 Kudos

2,026 Views
jiri_kral
NXP Employee
NXP Employee

Hi, 

in attachment is hello_word with enabled CLK OUT. From schematic I findout that PTE10 on EVB goes through resistor,  better option for clock output is use PTB5 or PTD14 (in project are all output enabled):

pastedImage_1.png

PTB5 out (sorry for screenshot from phone, I lost somewhere flash disk for saving pictures from scope directly):

IMG_20180724_110706.jpg

Attached project (for reference) used 112 MHz as sys clock. 

Jiri 

0 Kudos

2,026 Views
rajesh057
Contributor III

hi Jiri,

thanks you so much now I am able to see my clock.

clock_config.GIFI have few questions regarding clock their is RUN,VLPR,HSRUN modes avail in clock , I want to config core clock 80MHz and bus 40MHz means which one I want to consider .\

Thanks

Rajesh Kota 

0 Kudos

2,026 Views
jiri_kral
NXP Employee
NXP Employee

Hi, 

the default mode is HSRUN, so set dividers/multipliers to met your needs. 

Jiri

0 Kudos

2,026 Views
rajesh057
Contributor III

clock_config.GIF

hi Jiri,

as per above mail information I config my clock .  but SPLL_CLK   after multiply its coming 80 MHz its showing some warning it should be above 90MHz

thanks

Rajesh Kota

0 Kudos

2,026 Views
jiri_kral
NXP Employee
NXP Employee

For me works SPLL clock set to 160  and sys clock taken from SPLL and div by 2:

pastedImage_2.png

Here is my clock summary: 

pastedImage_1.png

Jiri

0 Kudos

2,026 Views
rajesh057
Contributor III

thank you Jiri ..my problems solved

thanks

Rajesh

0 Kudos

2,026 Views
rajesh057
Contributor III

hi Jiri,

I am getting one ERROR : HardFault_Handler for some files its getting and for some files its not getting.

thanks ,

Rajesh Kota

0 Kudos

2,026 Views
rajesh057
Contributor III

hi Jiri,

I have done what you said and I  generated code also...is their any function need to call in main.c to activate and see the result in oscilloscope .

Thanks

Rajesh

0 Kudos

2,026 Views
rajesh057
Contributor III

hi Jiri,

as per above information I have configured in processor export after that I have generated code and build it and flash my controller even I am unable to use in my oscilloscope ....is their any api need to call in main.c file example clock init or pin configuration like that....

thanks for helping

rajesh kota

0 Kudos

2,026 Views
mikedoidge
NXP Employee
NXP Employee

This is a MCU-specific question for S32K, I suggest you move this to the https://community.nxp.com/community/s32/s32k community.

Mike

0 Kudos