nrf52840-QFAA spi flash or qspi mode High power consumption when used P0.05->WP P0.07->MISO P0.08->CS P0.11->CLK P0.12->MOSI P1.09->HOLD

&spi0 {
	compatible = "nordic,nrf-spim";
	cs-gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
	pinctrl-0 = <&spi0_default>;
	pinctrl-1 = <&spi0_sleep>;
	pinctrl-names = "default", "sleep";
	status = "okay";
	zephyr,pm-device-runtime-auto;

	zd25wq32: zd25wq32@0 {
		compatible = "jedec,spi-nor";
		status = "okay";
		reg = <0>;
		spi-max-frequency = <DT_FREQ_M(8)>;
		jedec-id = [BA 60 16];
		size = <DT_SIZE_M(4)>;
		has-dpd;
		//t-enter-dpd = <10000>;
		//t-exit-dpd = <35000>;
		//wp-gpios = <&gpio0 5 (GPIO_ACTIVE_LOW)>;
		//hold-gpios = <&gpio1 9 (GPIO_ACTIVE_LOW)>;
	};
};

&spi0_default {
	group1 {
		psels = <NRF_PSEL(SPIM_SCK, 0, 11)>,
		  <NRF_PSEL(SPIM_MOSI, 0, 12)>,
		  <NRF_PSEL(SPIM_MISO, 0, 7)>;
	};
};

&spi0_sleep {
	group1 {
		psels = <NRF_PSEL(SPIM_SCK, 0, 11)>,
			<NRF_PSEL(SPIM_MOSI, 0, 12)>,
			<NRF_PSEL(SPIM_MISO, 0, 7)>;
		low-power-enable;
	};
};

  it will take about 25uA~ 28uA.

when I remove R18 R19, set io to input with pullup, it will take about 10uA,

&button1 {
    gpios = <&gpio0 5 (GPIO_ACTIVE_LOW|GPIO_PULL_UP)>;
};

&button2 {
    gpios = <&gpio1 9 (GPIO_ACTIVE_LOW|GPIO_PULL_UP)>;
};
this spi flash I have used in Other hardware,it take 4uA, used P0.24->MISO P1.00->CS P0.20->CLK P0.22->MOSI. I do not know why it High power consumption.
Parents Reply
  • Normal standby power consumption can be around 3uA. After enabling the deep sleep mode of the flash with ZD25WQ32, the power consumption ranges from more than 20uA to 200uA. After testing 10 PCBAs, only one was found to meet the power consumption described in the manual. There are no problems with the MCU and zephyr's spi flash driver. It's just the chip of the flash manufacturer that has problems. For comparison, hundreds of boards made with ZD25WQ16 are all normal. I'm replying here, hoping that others who see this post will no longer doubt the bug of the MCU or driver, and can boldly doubt the power consumption of the spi flash. Thank you

Children
Related