AnsweredAssumed Answered

CCM_CLKO2 clock output on MXRT1064

Question asked by T. Y. on Apr 8, 2020
Latest reply on Apr 14, 2020 by Kerry Zhou

Hello,

I am trying to output the clock of CCM_CLKO2 from GPIO_SD_B0_05 on i.MXRT1064.

I set pins and clocks in MCUXpresso Config Tool and implemented them, but I cannot observe the clocks from the pins.

Do I need to set anything other than the following?

 

pin_mux.c

IOMUXC_SetPinMux(
      IOMUXC_GPIO_SD_B0_05_CCM_CLKO2,         /* GPIO_SD_B0_05 is configured as CCM_CLKO2 */
      0U);                                                                        /* Software Input On Field: Input Path is determined by functionality */

clock_config.c

    /* Set clock out2 divider. */
    CCM->CCOSR = (CCM->CCOSR & (~CCM_CCOSR_CLKO2_DIV_MASK)) | CCM_CCOSR_CLKO2_DIV(2);
    /* Set clock out2 source. */
    CCM->CCOSR = (CCM->CCOSR & (~CCM_CCOSR_CLKO2_SEL_MASK)) | CCM_CCOSR_CLKO2_SEL(18);
    /* Enable clock out2. */
    CCM->CCOSR |= CCM_CCOSR_CLKO2_EN_MASK;

 

Any help is appreciated, thanks.

T.Y.

Outcomes