Hey,
I am trying to get my internal clock to the CLKOUT Pin.
I enabled the pin:
PCC-> PCCn[PCC_PORTB_INDEX] = PCC_PCCn_CGC_MASK; /* Enable clock to PORT B */
PTB->PDDR |= (1<<5); /* Port B5: Data Direction = output */
PORTB->PCR[5] = (0b101 << 8) | (1 << 6); /* Port D15: MUX = ALT5 (CLKOUT), high drive strength */
and connected the FLASH_CLK via SCG_CLKOUTCNFG and SIM_CHIPSEL to the Pin.
SCG->CLKOUTCNFG = SCG_CLKOUTCNFG_CLKOUTSEL(0); // SLOW_CLK to CLK_OUT
SIM->CHIPCTL |= SIM_CHIPCTL_CLKOUTEN(1)
| SIM_CHIPCTL_CLKOUTDIV(0)
| SIM_CHIPCTL_CLKOUTSEL(0);
But I cannot seee any clock signal on the pin.
I checked the Registers with S32 Design Studios debugger. There I see, that the CLKOUTEN Bit in SIM->CHIPCTL is cleared. If I am trying to set the bit with the debugger, it doesn't work.
Downloading 4 bytes @ address 0x40048004 - Verify failed
Read 4 bytes @ address 0x40048004 (Data = 0x00000000)
What is the problem? Do I have to enable a further clock?
Hi
I cannot set it either using FRDMPK144 - Q100 (N77P). It works with the new board.
Regards
Daniel
It seems to be so. The N77P mask set is a prototype. I can set the CLKOUTEN bit using your code on the new board with N47T mask set.
Regards
Daniel