Expected CLKOUT_RUN frequency not observed in the mapped GPIO

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

Expected CLKOUT_RUN frequency not observed in the mapped GPIO

Jump to solution
1,207 Views
punithchandra
Contributor IV

Hi Team,

We are using the NXP S32K388EVB-Q289 evaluation board.
We have configured the CLOCK_RUN frequency to be 20 MHz and it is sourced by PLL PHI0 (which is 160MHz). All the peripheral clocks are enabled in the MCU driver and the MCU is set to RUN mode.

 

punithchandra_0-1712862783609.png

 

We have configured the GPIO Pin PTD14's GPIO mode as SYSTEM_CLKOUT_RUN_OUT.

 

punithchandra_1-1712862830106.png

 

The expectation is to see the clock frequency on the GPIO PTD14 to be 20 MHz while measuring through any of the logic analyzer. However, when we measured using Saleae logic analyzer (connected to available GPIO mux pad on the Eval board), the GPIO value is always 0. Noise is observed in the analog channel. 

 

punithchandra_2-1712862863185.png

 

But the clock frequency value read from the API Mcu_GetClockFrequency(CLKOUT_RUN_CLK) is returning the value as expected 20 MHz.

 

punithchandra_3-1712862892555.png

 

We also checked the MCU MUX 6 and the GPIO110 register and looks like the values are expected ones.

punithchandra_5-1712862956859.png

 

punithchandra_4-1712862926411.png

 

Could you please check and let us know what could be the reason for the observed issue?

 

#S32K388 #S32K3 #CLKOUT_RUN #GPIO

0 Kudos
Reply
1 Solution
1,079 Views
punithchandra
Contributor IV

Hi Peter,

We could identify the connection where the PTD14 is routed and we could measure the configured frequency value from this pin.

punithchandra_0-1713280232474.png

 

Screenshot (177).png



Thank you for the support.

View solution in original post

0 Kudos
Reply
7 Replies
1,168 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

register setting for selecting CLKOUT looks fine. I can recommend to try/check below
- be sure you are on right pin on EVB
- be sure analyzer is using fast sample rate, or use scope
- use even higher divider to have lower freq on CLKOUT
- set drive strength for PTD14
- you can try different pins, ideally fast type

BR, Petr

0 Kudos
Reply
1,121 Views
punithchandra
Contributor IV

Hi Peter,

We checked all the below possibilities.

1. Confirmed the connected pin for measurement is PTD14.

punithchandra_7-1713185018248.png

 

2. Analyzer was set to highest available sample rate and also tried with the scope. In both cases, the result is same.

 

punithchandra_8-1713185123555.png

 

3. Tried with lower CLKOUT_RUN frequency and enabling the drive strength as well, still the same result.

4. Tried with both PTB5 & PTD14 which can be configured as CLKOUT_RUN and the result is same in all the pins. Couldn't test PTD10 since there is no GPIO tap out available to test it.

punithchandra_9-1713185287793.png

Note: PTD14 & PTB5 - GPIO Standard Plus (Switching up to 50 MHz and the CLKOUT_RUN is configured as 20MHz), PTD10 - GPIO Fast (Switching up to 120 MHz). Also as per the requirement, we have used PTD14 as the CLKOUT_RUN mode.

We have an LED blinking code and it is working as per the timings we have configured it to toggle. Basically what I have observed till now is, the expected clock frequency is generated but the same is not reflecting in the PTD14 pin whose GPIO mode is configured as CLKOUT_RUN.

 

Is there any other configuration which should be done other the above configurations? Can you please try to simulate and verify on S32K388 EVB just to make sure it is not the issue of the EVB?

 

This is the blocker point for us right now.

 

Regards,

Punith Chandra.

 

 

0 Kudos
Reply
1,095 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

please note no pins mentioned are connected by default to Arduino headers or IOmatrix. Those go to SABRE connector or QSPI memory. So please check board schematic to find right place to measure signal.

BR, Petr

0 Kudos
Reply
1,081 Views
punithchandra
Contributor IV

Hi,

Do you mean that the pins PTD14, PTD10 & PTB5 (which can be configured as the CLKOUT_RUN) are not connected to IO matrix by default?

We have this document S32K388EVB-Q289_EVB_HWPack_RevA0_Schematic 1 with us.

We could see the pin PTD14 is connected to the Ardunio header J702 pin 11.

punithchandra_1-1713277264507.png


But again we didn't see the frequency value on this pin as well.

Could you please let us know how can we identify if the pin is connected to the IO matrix or headers and also the location on the EVB where we can measure this signal as we don't have the layout information with us?

0 Kudos
Reply
1,080 Views
punithchandra
Contributor IV

Hi Peter,

We could identify the connection where the PTD14 is routed and we could measure the configured frequency value from this pin.

punithchandra_0-1713280232474.png

 

Screenshot (177).png



Thank you for the support.

0 Kudos
Reply
1,108 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

let me check with a board.
BTW what kind of driver is used, or can you share simplified example you have?

BR, Petr

0 Kudos
Reply
1,106 Views
punithchandra
Contributor IV

Hi Peter,

I am attaching the example what we are using.
The RTD package we are using is SW32K3_S32M27x_RTD_4.4_4.0.0_P20.

0 Kudos
Reply