In the s32 example code there is this line of code I don't understand:
PCC-> PCCn[PCC_PORTD_INDEX] = PCC_PCCn_CGC_MASK; /* Enable clock for PORT D */
//followed by this
PTD->PDDR |= 1<<0; /* Port D0: Data Direction= output */
PORTD->PCR = 0x00000100; /* Port D0: MUX = ALT1, GPIO (to blue LED on EVB) */
Why must you enable the clock for port d? What does this do? I have never seen this done on other micros?