Skip to content

Commit da3ec7d

Browse files
rodrigobrochadocarlescufi
authored andcommitted
drivers: flash: Fix regression on nrf52840 anomaly 122 workaround
A nordic hal update was made around the same time that anomaly 122 on nrf52840 was fixed. This update introduced qspi_pins_deconfigure() in the nrfx_qspi_uninit(). With that, the CS pin from QSPI becomes a floating pin after anomaly 122 uninit is executed. Set the CS pin high after the uninit to fix this. I'm assuming that floating CS pins that are likely to experience EMI can impact power consumption. That was the case with my custom board. My custom board with nrf52840 and MX25R3235F running the hello_world sample was consuming 2.3 mA before this patch, and 30 uA after applying it. Signed-off-by: Rodrigo Brochado <[email protected]>
1 parent e8f93a9 commit da3ec7d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/flash/nrf_qspi_nor.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,12 +389,13 @@ static void anomaly_122_uninit(const struct device *dev)
389389
}
390390
}
391391

392+
nrfx_qspi_uninit();
393+
392394
#ifndef CONFIG_PINCTRL
393395
nrf_gpio_cfg_output(QSPI_PROP_AT(csn_pins, 0));
394396
nrf_gpio_pin_set(QSPI_PROP_AT(csn_pins, 0));
395397
#endif
396398

397-
nrfx_qspi_uninit();
398399
qspi_initialized = false;
399400
}
400401

0 commit comments

Comments
 (0)