diff options
| author | Yihui Xiong <yihui.xiong@hotmail.com> | 2020-08-05 16:07:18 +0800 |
|---|---|---|
| committer | Yihui Xiong <yihui.xiong@hotmail.com> | 2020-08-05 16:07:18 +0800 |
| commit | dbe47a6a2a3a5e34f11cc18c397dbdedff2ad462 (patch) | |
| tree | 07e7bd604e4553d39734982edcecb2f5587e67c7 | |
| parent | 6dc0f4f1b68f4ac24bf85cc51252106ccfe43776 (diff) | |
adjust
| -rw-r--r-- | ports/nrf/supervisor/port.c | 3 | ||||
| -rw-r--r-- | ports/nrf/supervisor/qspi_flash.c | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/ports/nrf/supervisor/port.c b/ports/nrf/supervisor/port.c index 68d6f5f71..05970a3ed 100644 --- a/ports/nrf/supervisor/port.c +++ b/ports/nrf/supervisor/port.c @@ -302,7 +302,8 @@ void port_sleep_until_interrupt(void) { nrf_gpio_cfg_output(MICROPY_QSPI_CS); nrf_gpio_pin_write(MICROPY_QSPI_CS, 1); - *(volatile uint32_t *)0x40029010 = 1; + // Workaround to disable QSPI according to nRF52840 Revision 1 Errata V1.4 - 3.8 + NRF_QSPI->TASKS_DEACTIVATE = 1; *(volatile uint32_t *)0x40029054 = 1; NRF_QSPI->ENABLE = 0; } diff --git a/ports/nrf/supervisor/qspi_flash.c b/ports/nrf/supervisor/qspi_flash.c index 83261f080..d5c60ac9e 100644 --- a/ports/nrf/supervisor/qspi_flash.c +++ b/ports/nrf/supervisor/qspi_flash.c @@ -39,7 +39,7 @@ #include "supervisor/shared/external_flash/qspi_flash.h" #if defined(MICROPY_QSPI_OFF_WHEN_SLEEP) -#define QSPI_ENABLE qspi_enable +#define QSPI_ENABLE() qspi_enable() static void qspi_enable(void) { @@ -62,7 +62,7 @@ static void qspi_enable(void) } #else -#define QSPI_ENABLE() +#define QSPI_ENABLE() ((void)0) #endif bool spi_flash_command(uint8_t command) { |
