I found that a GPT running under freeRTOS stops when Linux 2.8 runs. I found a previous post by Stefan.tx that indicates GPTB should not be driven by ccmRootmuxGptSysPllPfd0, which is used by Linux.
Snippet of current failing code:
/* Enable PLL PFD0 for GPTA */
CCM_ControlGate(CCM, ccmPllGateSys, ccmClockNeededRunWait);
CCM_ControlGate(CCM, ccmPllGatePfd0, ccmClockNeededRunWait);
/* Select GPTA clock derived from PLL PFD0 */
CCM_UpdateRoot(CCM, BOARD_GPTA_CCM_ROOT, ccmRootmuxGptSysPllPfd0, 0, 0);
/* Enable clock used by GPTA */
CCM_EnableRoot(CCM, BOARD_GPTA_CCM_ROOT);
CCM_ControlGate(CCM, BOARD_GPTA_CCM_CCGR, ccmClockNeededRunWait);
And additional time initialization:
/* Initialize GPT module */
GPT_Init(BOARD_GPTA_BASEADDR, &config);
/* Set GPT clock source to 24M OSC */
GPT_SetClockSource(BOARD_GPTA_BASEADDR, gptClockSourceOsc);
The fix is supposed to be to use ccmRootmuxGptOsc24m
clock instead. But doing this does not result in the timer running at all.
Is there a complete example of using the ccmRootmuxGptOsc24m
for GPT use.
Thanks,
Robert