Power consumption of the SPI can not reduce(nrf_drv_spi_uninit) when i use GPIOTE HITOLO(high accuracy)

When i use  GPIOTE HITOLO(low accuracy)and then open spi to read flash and  close the SPI(nrf_drv_spi_uninit) and close the SPI 's GPIO (nrf_gpio_cfg_default) .

The power consumption is 40 ua

under the same conditions, i  change the GPIOTE HITOLO(high accuracy) , The power consumption is 320 ua. 

It look like the spi do not be closed. 

but i add the code (nrf_drv_gpiote_uninit) after the code (nrf_drv_spi_uninit) 

the power is  reduce to 40ua.

why   (nrf_drv_spi_uninit) not work   ,and (nrf_drv_gpiote_uninit) will reduce the SPI 's consumpti   on ?

SDK: nRF5_SDK_17.1.0

The code in accessory (1.txt)

Parents
  • I solved the problem


    If TWIM0 or SPIM0 is used:

    *(volatile uint32_t *)0x40003FFC = 0;
    *(volatile uint32_t *)0x40003FFC;
    *(volatile uint32_t *)0x40003FFC = 1;
    If TWIM1 or SPIM1 is used:

    *(volatile uint32_t *)0x40004FFC = 0;
    *(volatile uint32_t *)0x40004FFC;
    *(volatile uint32_t *)0x40004FFC = 1;
    If SPIM2 is used:

    *(volatile uint32_t *)0x40023FFC = 0;
    *(volatile uint32_t *)0x40023FFC;
    *(volatile uint32_t *)0x40023FFC = 1;

    Why we need to close the power_reg (0x40004FFC)

Reply
  • I solved the problem


    If TWIM0 or SPIM0 is used:

    *(volatile uint32_t *)0x40003FFC = 0;
    *(volatile uint32_t *)0x40003FFC;
    *(volatile uint32_t *)0x40003FFC = 1;
    If TWIM1 or SPIM1 is used:

    *(volatile uint32_t *)0x40004FFC = 0;
    *(volatile uint32_t *)0x40004FFC;
    *(volatile uint32_t *)0x40004FFC = 1;
    If SPIM2 is used:

    *(volatile uint32_t *)0x40023FFC = 0;
    *(volatile uint32_t *)0x40023FFC;
    *(volatile uint32_t *)0x40023FFC = 1;

    Why we need to close the power_reg (0x40004FFC)

Children
Related