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 Children
No Data
Related