Skip to content

Commit 1681c7e

Browse files
sylvioalveskartben
authored andcommitted
soc: esp32: fix appcpu register access
Build is failing due to wrong calls to appcpu stall and clock gating. This fixes it by using proper registers. Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
1 parent 52abef2 commit 1681c7e

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

soc/espressif/esp32/esp32-mp.c

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -181,15 +181,10 @@ void esp_appcpu_start(void *entry_point)
181181

182182
esp_rom_ets_set_appcpu_boot_addr((void *)0);
183183

184-
RTC_CNTL_SW_CPU_STALL &= ~RTC_CNTL_SW_STALL_APPCPU_C1;
185-
RTC_CNTL_OPTIONS0 &= ~RTC_CNTL_SW_STALL_APPCPU_C0;
186-
DPORT_APPCPU_CTRL_B |= DPORT_APPCPU_CLKGATE_EN;
187-
DPORT_APPCPU_CTRL_C &= ~DPORT_APPCPU_RUNSTALL;
188-
189-
/* Pulse the RESETTING bit */
190-
DPORT_APPCPU_CTRL_A |= DPORT_APPCPU_RESETTING;
191-
DPORT_APPCPU_CTRL_A &= ~DPORT_APPCPU_RESETTING;
192-
184+
DPORT_SET_PERI_REG_MASK(DPORT_APPCPU_CTRL_B_REG, DPORT_APPCPU_CLKGATE_EN);
185+
DPORT_CLEAR_PERI_REG_MASK(DPORT_APPCPU_CTRL_C_REG, DPORT_APPCPU_RUNSTALL);
186+
DPORT_SET_PERI_REG_MASK(DPORT_APPCPU_CTRL_A_REG, DPORT_APPCPU_RESETTING);
187+
DPORT_CLEAR_PERI_REG_MASK(DPORT_APPCPU_CTRL_A_REG, DPORT_APPCPU_RESETTING);
193188

194189
/* extracted from SMP LOG above, THIS IS REQUIRED FOR AMP RELIABLE
195190
* OPERATION AS WELL, PLEASE DON'T touch on the dummy write below!

0 commit comments

Comments
 (0)