CCM_CLKO2 clock output on MXRT1064

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CCM_CLKO2 clock output on MXRT1064

Jump to solution
1,355 Views
yamakatb
Contributor III

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.

Labels (1)
1 Solution
1,132 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi T. Y.,

  Could you please tell me which detail clock you want to output in CCM_CLKO2 from GPIO_SD_B0_05?

  pastedImage_4.png

  I find your code is choose the sai1_clk_root.

pastedImage_1.png

   Do you already enable the related clock?

  Please tell me which detail code you want to output, then I will also help you to test it.

Kerry

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

View solution in original post

0 Kudos
4 Replies
1,133 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi T. Y.,

  Could you please tell me which detail clock you want to output in CCM_CLKO2 from GPIO_SD_B0_05?

  pastedImage_4.png

  I find your code is choose the sai1_clk_root.

pastedImage_1.png

   Do you already enable the related clock?

  Please tell me which detail code you want to output, then I will also help you to test it.

Kerry

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
1,132 Views
rileya53
Contributor I

Thanks, your guide. Really helped me.

Relevant clock was not enabled.

Waveform output came as expected;

Thanks.

0 Kudos
1,132 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi riley mahi,

  Perfect! I am glad to hear you make it works now.

  If you have any questions in the future, welcome to create the question post, thanks!

Best Regards,

Kerry

0 Kudos
1,132 Views
yamakatb
Contributor III

Hi kerryzhou,

Thank you for helping me,

That is correct.

Did not enable the relevant clock.

Waveform came out as desired!

Best regards,
T.Y.