Skip to content

Commit dbe47a6

Browse files
committed
adjust
1 parent 6dc0f4f commit dbe47a6

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

ports/nrf/supervisor/port.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,8 @@ void port_sleep_until_interrupt(void) {
302302
nrf_gpio_cfg_output(MICROPY_QSPI_CS);
303303
nrf_gpio_pin_write(MICROPY_QSPI_CS, 1);
304304

305-
*(volatile uint32_t *)0x40029010 = 1;
305+
// Workaround to disable QSPI according to nRF52840 Revision 1 Errata V1.4 - 3.8
306+
NRF_QSPI->TASKS_DEACTIVATE = 1;
306307
*(volatile uint32_t *)0x40029054 = 1;
307308
NRF_QSPI->ENABLE = 0;
308309
}

ports/nrf/supervisor/qspi_flash.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
#include "supervisor/shared/external_flash/qspi_flash.h"
4040

4141
#if defined(MICROPY_QSPI_OFF_WHEN_SLEEP)
42-
#define QSPI_ENABLE qspi_enable
42+
#define QSPI_ENABLE() qspi_enable()
4343

4444
static void qspi_enable(void)
4545
{
@@ -62,7 +62,7 @@ static void qspi_enable(void)
6262
}
6363

6464
#else
65-
#define QSPI_ENABLE()
65+
#define QSPI_ENABLE() ((void)0)
6666
#endif
6767

6868
bool spi_flash_command(uint8_t command) {

0 commit comments

Comments
 (0)