Skip to content

Commit f8a8401

Browse files
committed
targets:TARGET_IMX: Fix the flash init risk
The flash access may fail when implementing flash initialization. So there is risk for interrupt handler which linked in flash space. Add the critical section to avoid the risk. Signed-off-by: Gavin Liu <[email protected]>
1 parent b53d40b commit f8a8401

File tree

1 file changed

+2
-0
lines changed
  • targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_IMX

1 file changed

+2
-0
lines changed

targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_IMX/flash_api.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,9 @@ void flexspi_nor_flash_read_data_ram(uint32_t addr, uint32_t *buffer, uint32_t s
278278

279279
int32_t flash_init(flash_t *obj)
280280
{
281+
core_util_critical_section_enter();
281282
flexspi_update_lut_ram();
283+
core_util_critical_section_exit();
282284

283285
return 0;
284286
}

0 commit comments

Comments
 (0)