mirror of https://github.com/ARMmbed/mbed-os.git
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 <gang.liu@nxp.com>pull/12711/head
parent
b53d40b269
commit
f8a8401a13
|
|
@ -278,7 +278,9 @@ void flexspi_nor_flash_read_data_ram(uint32_t addr, uint32_t *buffer, uint32_t s
|
|||
|
||||
int32_t flash_init(flash_t *obj)
|
||||
{
|
||||
core_util_critical_section_enter();
|
||||
flexspi_update_lut_ram();
|
||||
core_util_critical_section_exit();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue