mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
esp32_spiflash.c: Pause the other CPU during flash operation.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
This commit is contained in:
committed by
Xiang Xiao
parent
1de17c364f
commit
dfe1637864
@@ -419,6 +419,7 @@ static inline void IRAM_ATTR
|
||||
DEBUGASSERT(state->cpu == 0 || state->cpu == 1);
|
||||
#ifdef CONFIG_SMP
|
||||
DEBUGASSERT(other == 0 || other == 1);
|
||||
up_cpu_pause(other);
|
||||
#endif
|
||||
|
||||
spi_disable_cache(state->cpu, &state->val[state->cpu]);
|
||||
@@ -454,6 +455,7 @@ static inline void IRAM_ATTR
|
||||
spi_enable_cache(state->cpu, state->val[state->cpu]);
|
||||
#ifdef CONFIG_SMP
|
||||
spi_enable_cache(other, state->val[other]);
|
||||
up_cpu_resume(other);
|
||||
#endif
|
||||
|
||||
leave_critical_section(state->flags);
|
||||
|
||||
Reference in New Issue
Block a user