Skip to content

Commit 5531525

Browse files
MaureenHelmgalak
authored andcommitted
soc: arm: Fix condition to set lpc55xxx flash wait states
Commit f5c6afe attempted to avoid accessing lpc55xxx flash registers in nonsecure mode by conditionalizing part of the SoC clock initialization routine on whether the flash driver was enabled. This caused secure applications without the flash driver enabled (e.g., hello_world on lpcxpresso55s69_cpu0) to not boot or show any console output. Fix this by changing the condition to depend on whether we are building a nonsecure image. Signed-off-by: Maureen Helm <[email protected]>
1 parent 4889f4f commit 5531525

File tree

1 file changed

+1
-1
lines changed
  • soc/arm/nxp_lpc/lpc55xxx

1 file changed

+1
-1
lines changed

soc/arm/nxp_lpc/lpc55xxx/soc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ static ALWAYS_INLINE void clock_init(void)
5050
/* Enable FRO HF(96MHz) output */
5151
CLOCK_SetupFROClocking(96000000U);
5252

53-
#if defined(CONFIG_SOC_FLASH_MCUX)
53+
#if !defined(CONFIG_TRUSTED_EXECUTION_NONSECURE)
5454
/*!< Set FLASH wait states for core */
5555
CLOCK_SetFLASHAccessCyclesForFreq(96000000U);
5656
#endif

0 commit comments

Comments
 (0)