Hi Dialog
I am using DSPS slave project and implemented extended Sleep , it is working properly.
But the power consumption is not proper , i am Flashing the code in SPI Flash and checking the consumption
1 . IOT BOARD DA14583 - IOT software - Comsumption in Sleep 80ua
2。IOT板DA14583 - DSPS从软件 - 消费180UA在睡眠中
3. Murata DA14580 - P2ML3256 - DSPS Slave software- Consumption 160ua in sleep
4.定制板 - DA14583 - DSPS DLAVE软件消耗220UA在睡眠中
5. IOT Board - Da14583 SDK 5.0.4 Proximity Reporter Consumption 180ua in sleep
All i checked via Multimeter (connect is CR2032 battery one end to Multimeter , multimeter other end to Board ,settings: ua ,current mode), why i am not seeing below 5ua in any of the boards , But earlier using UART booter mode i achieved 2ua consumption , What could be the issue ??

Hi prasanth,
The 2uA power consuption is achieved when the device is in sleep mode with no activity at all, the IoT at some point goes in sleep mode if there is no movement for quite amount of time but it also has additional sensors consuming power so you wont be able to see this kind of low power. The DSPS example it doesn't fall in permanent sleep but keeps on waking up and goes to sleep depending on its advertising and connection interval, so again there is no way to see 2uA power consumption. Also, since you are using a flash on your board be aware that the flash is also consuming power, and quite a significant amount if its not power down (via the power down command of the flash- spi_flash_power_down()). So if you were seeing differences between UART and SPI booting the latter that is the most probable cause.
Thanks MT_dialog
Hi Dialog
感谢你的回复
我添加了spi_flash_power_down()
/*******************************************************************************************************************/
==>>>>>>>>>> in @file user_periph_setup.c
#ifdef da14580_custom_board.
GPIO_ConfigurePin( SPI_GPIO_PORT, SPI_CS_PIN, OUTPUT, PID_SPI_EN, true );
GPIO_ConfigurePin( SPI_GPIO_PORT, SPI_CLK_PIN, OUTPUT, PID_SPI_CLK, false );
GPIO_ConfigurePin( SPI_GPIO_PORT, SPI_DO_PIN, OUTPUT, PID_SPI_DO, false );
gpio_configurepin(spi_gpio_port,spi_di_pin,输入,pid_spi_di,false);
#endif
#ifdef DA14583_CUSTOM_BOARD
GPIO_ConfigurePin (DA14583_SPI_FLASH_EN_GPIO_PORT, DA14583_SPI_FLASH_EN_GPIO_PIN, OUTPUT, PID_SPI_EN, true );
GPIO_ConfigurePin (DA14583_SPI_FLASH_CLK_GPIO_PORT, DA14583_SPI_FLASH_CLK_GPIO_PIN, OUTPUT, PID_SPI_CLK, false );
GPIO_ConfigurePin (DA14583_SPI_FLASH_DO_GPIO_PORT, DA14583_SPI_FLASH_DO_GPIO_PIN, OUTPUT, PID_SPI_DO, false );
GPIO_ConfigurePin (DA14583_SPI_FLASH_DI_GPIO_PORT, DA14583_SPI_FLASH_DI_GPIO_PIN, INPUT, PID_SPI_DI, false );
#endif
= >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> @file user_sps_device.c
void user_on_init(void)
{
user_scheduler_init();
default_app_on_init();
da14580_spi_flash_init();
da14580_spi_flash_deinit();
}
= >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
void da14580_spi_flash_init(void)
{
#ifdef DA14583_CUSTOM_BOARD
//Unregister old pin map of sensor spi network
GPIO_ConfigurePin (DA14583_SPI_FLASH_EN_GPIO_PORT, DA14583_SPI_FLASH_DO_GPIO_PIN, INPUT_PULLUP, PID_GPIO, true);
GPIO_ConfigurePin (DA14583_SPI_FLASH_DI_GPIO_PORT, DA14583_SPI_FLASH_DI_GPIO_PIN, INPUT_PULLUP, PID_GPIO, true);
GPIO_ConfigurePin (DA14583_SPI_FLASH_CLK_GPIO_PORT, DA14583_SPI_FLASH_CLK_GPIO_PIN , INPUT_PULLUP, PID_GPIO, true);
GPIO_ConfigurePin (DA14583_SPI_FLASH_EN_GPIO_PORT, DA14583_SPI_FLASH_EN_GPIO_PIN, OUTPUT, PID_SPI_CLK, false );
int8_t man_dev_id = 0;
spi_driver_cs_pad.port = GPIO_PORT_2;
spi_driver_cs_pad.pin = GPIO_PIN_3;
man_dev_id = spi_flash_enable(spi_driver_cs_pad.port,spi_driver_cs_pad.pin);
if (man_dev_id == SPI_FLASH_AUTO_DETECT_NOT_DETECTED)
{
spi_flash_init(da14583_spi_flash_size,da14583_spi_flash_page_size);
}
//上电闪存
//spi_flash_release_from_power_down();
#endif
#ifdef da14580_custom_board.
spi_pad_t cs_pad_param;
int8_t man_dev_id = 0;
cs_pad_param.port = SPI_EN_GPIO_PORT;
cs_pad_param.pin = SPI_EN_GPIO_PIN;
man_dev_id = spi_flash_enable(cs_pad_param.port,cs_pad_param.pin);
if (man_dev_id == SPI_FLASH_AUTO_DETECT_NOT_DETECTED)
{
//spi_init(&cs_pad_param, SPI_MODE_8BIT, SPI_ROLE_MASTER, SPI_CLK_IDLE_POL_LOW, SPI_PHA_MODE_0, SPI_MINT_DISABLE, SPI_XTAL_DIV_8);
spi_flash_init(SPI_FLASH_DEFAULT_SIZE, SPI_FLASH_DEFAULT_PAGE);
}
spi_flash_release_from_power_down();
#endif
}
void clr_flash_cs( void )
{
#ifdef DA14583_CUSTOM_BOARD
gpio_setinactive(da14583_spi_flash_en_gpio_port,da14583_spi_flash_en_gpio_pin);
#endif
#ifdef da14580_custom_board.
GPIO_SetInactive(SPI_EN_GPIO_PORT, SPI_EN_GPIO_PIN);
#endif
}
void set_flash_cs(void)
{
#ifdef DA14583_CUSTOM_BOARD
gpio_setactive(da14583_spi_flash_en_gpio_port,da14583_spi_flash_en_gpio_pin);
#endif
#ifdef da14580_custom_board.
GPIO_SetActive(SPI_EN_GPIO_PORT, SPI_EN_GPIO_PIN);
#endif
}
void da14580_spi_flash_deinit( void ) {
#ifdef DA14583_CUSTOM_BOARD
set_flash_cs();
spi_flash_power_down();
clr_flash_cs();
#endif
#ifdef da14580_custom_board.
set_flash_cs();
spi_flash_power_down();
clr_flash_cs();
#endif
}
我已为基于DA14583的板添加此设置,我没有看到任何改进,请帮忙..
Thank you
Hi prasanth,
如果删除闪光灯或根本不使用闪光灯,您是否看到功耗的任何改进?此外,上面提到的还取决于器件的BLE活动,例如,当设备进入睡眠时(无睡眠和唤醒,当设备处于睡眠模式时,电源消耗)的功耗是什么。您必须检查何种电量,是外部模块吗?这是580不睡觉吗?这是你额外的额外的动力,导致了这一点吗?
Thanks MT_dialog