Skip to content

Commit bb7f776

Browse files
DerekSnellnashif
authored andcommitted
boards: nxp: frdm_mcxn947 and mcx_n9xx_evk: enable clock for FMU
For internal flash FMU programg/erase operations, enable the FRO12MHZ clock when the flash driver is enabled. Signed-off-by: Derek Snell <derek.snell@nxp.com>
1 parent 1fd24fb commit bb7f776

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

boards/nxp/frdm_mcxn947/board.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ void board_early_init_hook(void)
9999
/* Configure Flash wait-states to support 1.2V voltage level and 150000000Hz frequency */
100100
FMU0->FCTRL = (FMU0->FCTRL & ~((uint32_t)FMU_FCTRL_RWSC_MASK)) | (FMU_FCTRL_RWSC(0x3U));
101101

102+
#ifdef CONFIG_FLASH
103+
/* Enable clock for internal FMU flash */
104+
CLOCK_SetupClockCtrl(SYSCON_CLOCK_CTRL_FRO12MHZ_ENA_MASK);
105+
#endif
106+
102107
/* Enable FRO HF(48MHz) output */
103108
CLOCK_SetupFROHFClocking(48000000U);
104109

boards/nxp/mcx_n9xx_evk/board.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ void board_early_init_hook(void)
9999
/* Configure Flash wait-states to support 1.2V voltage level and 150000000Hz frequency */
100100
FMU0->FCTRL = (FMU0->FCTRL & ~((uint32_t)FMU_FCTRL_RWSC_MASK)) | (FMU_FCTRL_RWSC(0x3U));
101101

102+
#ifdef CONFIG_FLASH
103+
/* Enable clock for internal FMU flash */
104+
CLOCK_SetupClockCtrl(SYSCON_CLOCK_CTRL_FRO12MHZ_ENA_MASK);
105+
#endif
106+
102107
/* Enable FRO HF(48MHz) output */
103108
CLOCK_SetupFROHFClocking(48000000U);
104109

0 commit comments

Comments
 (0)