S32k144 BUS CLOCK

cancel
Showing results for 
Search instead for 
Did you mean: 

S32k144 BUS CLOCK

865 Views
hajianik
Senior Contributor I

I was wondering is there a way to look at the BUS CLOCK on the scope for S32K144 target?

Not talking about PLL,OSC, ....

Thanks

Tags (1)
0 Kudos
5 Replies

353 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

Only Flash clock can be routed to CLKOUT pins.

BUS_CLK in CHIPCTL_CLKOUTSEL can't be selected on S32K144 (0N47T). 

It should be available on S32K144 (0N57U).

Regards,

Daniel

353 Views
hajianik
Senior Contributor I

Hi Daniel,

So what is the setting for Flash clock in CHIPCTL_CLKOUTSEL ?

I looked at the manual for the description of this register, I don't see a flash /slow clk  for CLKOUTSEL field in there.

I have configured PTD14  as clkout output.I tried different combination of CLKOUTDIV / CLKOUTSEL , they show up just as a high output on the scope.

How do I find out if my target is(0N47T) or (0N57T) ?

Thanks,

Koorosh Hajiani

0 Kudos

353 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi Koorosh,

Below is the routing, Figure 27-1 RM, rev.8

Don't forget to enable the function in SIM_CHIPCTL_CLKOUTEN.

The mask set can be found printed on the MCU package.

pastedImage_1.png

Regards,

Daniel

0 Kudos

353 Views
hajianik
Senior Contributor I

Hi Daniel,

It is not working for me. My target is S32K146 , MASK:0N73V

please see my setting:

PTD14: CLKOUT

clkout_ptd14.PNG

Using PE CLKOUT

CapturePE_CLKOUT.PNG

SIM_CHIPCTL Setting

Capture.CHIPCRL.PNG

SCG_CLKOUT

CaptureSCG_CLKOUT.PNG

I JUST DON'T ANYTHING ON PTD14.

I TRIED DIFFERENT COMBO WITH NO LUCK.

Thanks

0 Kudos

353 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi Koorosh,

Haven't tried with SDK, but this simple code works for me.

#include "S32K146.h" /* include peripheral declarations S32K146 */

int main(void)
{
  PCC->PCCn[PCC_PORTD_INDEX]=PCC_PCCn_CGC_MASK; //Enable clock for PORTD
  PORTD->PCR[14] |= PORT_PCR_MUX(7);            //Alternative 7, set pin as CLKOUT
  SCG->CLKOUTCNFG = SCG_CLKOUTCNFG_CLKOUTSEL(0);//CLKOUTCNFG_CLKOUTSEL(0), Flash clock
  SIM->CHIPCTL |= SIM_CHIPCTL_CLKOUTSEL(0);     //CHIPCTL_CLKOUTSEL(0), Flash clock
  SIM->CHIPCTL |= SIM_CHIPCTL_CLKOUTDIV(0);     //Output clock divide by 1
  SIM->CHIPCTL |= SIM_CHIPCTL_CLKOUTEN(1);      //Enable CLKOUT

  for(;;) 
  {
  }

/* to avoid the warning message for GHS and IAR: statement is unreachable*/
#if defined (__ghs__)
#pragma ghs nowarning 111
#endif
#if defined (__ICCARM__)
#pragma diag_suppress=Pe111
#endif
 return 0;
}

Regards,

Daniel

0 Kudos