MCX-N947: 1 MHz clock (sirc_1mhz, clk_1M)

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

MCX-N947: 1 MHz clock (sirc_1mhz, clk_1M)

804 Views
ygrayne
Contributor II

According to the block diagram on page 1221 of the reference manual for the MCX-N947, the clock 'sirc_1mhz' is always on. SysTick and CTIMER allow to select this clock, assuming 'clk-1M' is this SIRC-derived 1 MHz clock (is it?). However, neither SysTick nor CTIMER work with this clock selected. Both work with other clock selections.

Do I miss something to enable the 1 MHz clock, despite the aforementioned block diagram?

FWIW, a similar block diagram can be found in the ref manual for the MCX-A346, and on this MCU the 1 MHz clock is always on (called 'CLK_1M' there, in the diagram 'sirc_1mhz').

Thanks.

Labels (1)
0 Kudos
Reply
1 Reply

777 Views
Harry_Zhang
NXP Employee
NXP Employee

Hi @ygrayne 

"According to the block diagram on page 1221 of the reference manual for the MCX-N947, the clock 'sirc_1mhz' is always on. "

No, you need to enable this clock.

SYSCON->CLOCK_CTRL |=  SYSCON_CLOCK_CTRL_FRO1MHZ_CLK_ENA_MASK;                 /*!< Enable FRO_1M is on */

"SysTick and CTIMER allow to select this clock, assuming 'clk-1M' is this SIRC-derived 1 MHz clock (is it?)."

Yes, you are right.

I think you can refer to this code.

SYSCON->CLOCK_CTRL |=  SYSCON_CLOCK_CTRL_FRO1MHZ_CLK_ENA_MASK;                 /*!< Enable FRO_1M is on */
CLOCK_AttachClk(kCLK_1M_to_SYSTICK0);                 /*!< Switch SYSTICK0 to CLK_1M */
CLOCK_AttachClk(kCLK_1M_to_CTIMER0);                 /*!< Switch CTIMER0 to CLK_1M */

 

Hope this will help you.

BR

Harry

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2204757%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EMCX-N947%3A%201%20MHz%20clock%20(sirc_1mhz%2C%20clk_1M)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2204757%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EAccording%20to%20the%20block%20diagram%20on%20page%201221%20of%20the%20reference%20manual%20for%20the%20MCX-N947%2C%20the%20clock%20'sirc_1mhz'%20is%20always%20on.%20SysTick%20and%20CTIMER%20allow%20to%20select%20this%20clock%2C%20assuming%20'clk-1M'%20is%20this%20SIRC-derived%201%20MHz%20clock%20(is%20it%3F).%20However%2C%20neither%20SysTick%20nor%20CTIMER%20work%20with%20this%20clock%20selected.%20Both%20work%20with%20other%20clock%20selections.%3C%2FP%3E%3CP%3EDo%20I%20miss%20something%20to%20enable%20the%201%20MHz%20clock%2C%20despite%20the%20aforementioned%20block%20diagram%3F%3C%2FP%3E%3CP%3EFWIW%2C%20a%20similar%20block%20diagram%20can%20be%20found%20in%20the%20ref%20manual%20for%20the%20MCX-A346%2C%20and%20on%20this%20MCU%20the%201%20MHz%20clock%20%3CSTRONG%3Eis%3C%2FSTRONG%3E%20always%20on%20(called%20'CLK_1M'%20there%2C%20in%20the%20diagram%20'sirc_1mhz').%3C%2FP%3E%3CP%3EThanks.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2204757%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EMCXN%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2204837%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MCX-N947%3A%201%20MHz%20clock%20(sirc_1mhz%2C%20clk_1M)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2204837%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F255348%22%20target%3D%22_blank%22%3E%40ygrayne%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%22According%20to%20the%20block%20diagram%20on%20page%201221%20of%20the%20reference%20manual%20for%20the%20MCX-N947%2C%26nbsp%3B%3CSPAN%3Ethe%20clock%20'sirc_1mhz'%20is%20always%20on.%26nbsp%3B%3C%2FSPAN%3E%22%3C%2FP%3E%0A%3CP%3ENo%2C%20you%20need%20to%20enable%20this%20clock.%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3ESYSCON-%26gt%3BCLOCK_CTRL%20%7C%3D%20%20SYSCON_CLOCK_CTRL_FRO1MHZ_CLK_ENA_MASK%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*!%26lt%3B%20Enable%20FRO_1M%20is%20on%20*%2F%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%22%3CSPAN%3ESysTick%20and%20CTIMER%20allow%20to%20select%20this%20clock%2C%20assuming%20'clk-1M'%20is%20this%20SIRC-derived%201%20MHz%20clock%20(is%20it%3F).%3C%2FSPAN%3E%22%3C%2FP%3E%0A%3CP%3EYes%2C%20you%20are%20right.%3C%2FP%3E%0A%3CP%3EI%20think%20you%20can%20refer%20to%20this%20code.%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3ESYSCON-%26gt%3BCLOCK_CTRL%20%7C%3D%20%20SYSCON_CLOCK_CTRL_FRO1MHZ_CLK_ENA_MASK%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*!%26lt%3B%20Enable%20FRO_1M%20is%20on%20*%2F%0ACLOCK_AttachClk(kCLK_1M_to_SYSTICK0)%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*!%26lt%3B%20Switch%20SYSTICK0%20to%20CLK_1M%20*%2F%0ACLOCK_AttachClk(kCLK_1M_to_CTIMER0)%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F*!%26lt%3B%20Switch%20CTIMER0%20to%20CLK_1M%20*%2F%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%0A%3CP%3EHope%20this%20will%20help%20you.%3C%2FP%3E%0A%3CP%3EBR%3C%2FP%3E%0A%3CP%3EHarry%3C%2FP%3E%3C%2FLINGO-BODY%3E