CCM_CLKO2 clock output on MXRT1064

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

CCM_CLKO2 clock output on MXRT1064

跳至解决方案
2,438 次查看
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.

标签 (1)
1 解答
2,215 次查看
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 项奖励
回复
4 回复数
2,216 次查看
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 项奖励
回复
2,215 次查看
rileya53
Contributor I

Thanks, your guide. Really helped me.

Relevant clock was not enabled.

Waveform output came as expected;

Thanks.

0 项奖励
回复
2,215 次查看
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 项奖励
回复
2,215 次查看
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.