AnsweredAssumed Answered

S32K116_EVB Clock output

Question asked by KWAK D.Y on Mar 11, 2019
Latest reply on Jul 10, 2019 by 刘 明
I want to use clock out with S32K116_EVB.
I seted it as follows, but it does not work.
Please respond what is the problem.
void CLKOUT_init(void)
{
 PCC->PCCn[PCC_PORTB_INDEX ] |=PCC_PCCn_CGC_MASK;  /* Enable clock for PORTB */
 PTB->PDDR |= (1<<5);        /* Data Direction= output (default) */ 
 PORTB->PCR[5] |= PORT_PCR_MUX(5);             /* Port B5: MUX = CLKOUT */

SIM->CHIPCTL |= SIM_CHIPCTL_CLKOUTSEL(8);
SIM->CHIPCTL |= SIM_CHIPCTL_CLKOUTDIV(0); //Output clock divide by 1
SIM->CHIPCTL |= SIM_CHIPCTL_CLKOUTEN(1); //Enable CLKOUT
}

Outcomes