Custom Board_Ext sleep current

21 posts / 0 new
Last post
prasanth.velliy...
Offline
Last seen:1 year 10 months ago
Joined:2016-02-18 12:18
Custom Board_Ext sleep current

Hi Dialog Team

I am using our own custom board , Battery operated , Buck Mode , Da14580 with external flash with DSPS Device Project , added i2c driver ( SDA , SCL with pull up register - 10K connected to VBAT3v), Once data send to Master BLE device , DSPS Device disconnect and enters into extended sleep , I have checked the power consumption using Digital Multimeter(DMM) ,
Advertising - 512ua ,
connection , data xt - 776ua
Sleep - 322ua ,

我已经测试了相同的需求方与日本村田公司设备项目P2ML 3656 - Murata LBCA2HNZYZ) - Type ZY Dev Board , with DMM and power profiler (with out i2c driver , static data)
Advertising - 240ua ,
connection , data xt - 537ua
Sleep - 110ua ,

i have tested same setup with Dialog IOT da14583 also
Advertising - 250ua ,
connection , data xt - 313 - 512 ua
Sleep - 227 ua , i am getting...

why i am not able to get 1.3u Amps or near ?? Plaese Help me to solve this ??

Thank you Dialog Team

Device:
MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
Joined:2015-06-08 11:34
Hi prasanth,

Hi prasanth,

The DSPS project as is never falls in permanent sleep, it always keeps on advertising or keeps a connection alive and sleep between connection intervals or advertising intervals. So if at your firmware you set the device in permanent sleep and you have the sleeping feature on then you should see a value close to 1.3uA. Additional consumption might be added by other devices that you have on your board (i suppose that there is an I2C memory on the board, so the additional power consumption might be comming from that device) or by leakages on yoru board. Also the values that you are mentioning i suppose that they are the averaged values that you instruments measures. Please check the Tutorial 4 : configuring sleep mode in the Documents tab in the tutorial section on how to properly measure the power consumption during sleep.

Thanks MT_dialog

prasanth.velliy...
Offline
Last seen:1 year 10 months ago
Joined:2016-02-18 12:18
In DSPS Device Project ,once

在dsp设备项目,一旦数据TX掌握鳍ished , we have put DSPS Device for 5 min sleep , i am able to see device is not advertising for 5 min , after 5 min only DSPS Device is advertising. so sleep is working properly , isn't ??

i2c driver for Temperature & Humidity sensor , ambient light sensor..

As you said if Hardware issue , why in DA14583 IOT kit also i am getting the same , (By connecting multimeter , to the on / off switch of Smart band IOT BLE board , battery end ti multimeter positive , ckt end to mutimeter com)

Thank you Dialog

prasanth.velliy...
Offline
Last seen:1 year 10 months ago
Joined:2016-02-18 12:18
Hi Dialog

Hi Dialog

PFA. power profiler graph

Thank you

Attachment:
MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
Joined:2015-06-08 11:34
Hi prasanth,

Hi prasanth,

From the power profiler i can see that the device is sleeping and waking up so yes, the device should be sleeping, since you have sensors on your board, your sensors consume power additional power, its not only the 580 that consumes power. Regarding the IoT since it also has additional sensors and you wont be able to get about 1.4uA when the device is sleeping, the current consumed is about 11uA.

Thanks MT_dialog

wisilica
Offline
Last seen:10 months 2 weeks ago
Joined:2015-03-17 08:16
Hi,

Hi,

You need to cut off supply to your flash to reduce the current consumption.

prasanth.velliy...
Offline
Last seen:1 year 10 months ago
Joined:2016-02-18 12:18
Hi Wisilica

Hi Wisilica

Thank you for your reply.

Then How DA14583 IOT smart Bond kit will give 11ua , does this also using the "cut off spi supply" configuration.. please give me some more details ...

i2c sensor have 10k pullup , will this cause any issue ?? ... How to resolve these ...?

thank you

prasanth.velliy...
Offline
Last seen:1 year 10 months ago
Joined:2016-02-18 12:18
Hi Dialog

Hi Dialog

https://support.dialog-semiconductor.com/issues-external-spi-flash

As mentioned in the above post , will secondary bootloader fix this issue (for DA14580) ??

Thank you.

MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
Joined:2015-06-08 11:34
Hi prasanth,

Hi prasanth,

The IoT, sets the flash in low power mode when its not used (it still consumes some power but not as much as it had when it was fully functional), it also sets the additional sensors in low power mode, you can check the spi_flash_power_down() function in the spi_flash.c file. As i ve mentioned above you will have to check if the other modules that you have on your system consume additional power.

Regarding if the post that you ve pasted above will solve your problem, are you sure that the extra power that your custom device consumes comes from the external flash ? The reason of the secondary bootloader is that, if you power down your flash, and you would like to reset the device the ROM bootloader doesn't have the ability to wake up the flash, thats where the secondary bootloader comes to power up the flash so that the 580 will boot normally. So check from where this extra power consumption is comming from (memories, sensors, etc).

Thanks MT_dialog

prasanth.velliy...
Offline
Last seen:1 year 10 months ago
Joined:2016-02-18 12:18
Hi Dialog

Hi Dialog

How to use spi_flash_power_down() in DSPS device project (for both DA14580 and DA14583 ), Is there any sample project or Document ??

PFA for the external peripherals in my custom Board , i am using this battery level monitoring also in DSPS ,

I have two custom Boards , One with DA14580BLE , another one with DA14583 , if SPI flash drawing more power , why both custom boards current consumption almost same ??custom Board with DA14583 should show less , Right?

MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
Joined:2015-06-08 11:34
Hi prasanth,

Hi prasanth,

Since the DSPS example doens't use a flash there is no example there, but reference designs developed with flash have this feature, you just invoke the function i mentioned above in order to powerdown the flash, like the beacon, the implementation of the function is located in the spi_flash.c driver.

I am not able to foresee why there is extra current on your board since that depends in a quite large amount of factors, you will have to check one by one what increases your power consumption, check the additional devices. The 583 has an embedded flash and you mentioned that 580 has an external flash, so i suppose that if you dont power the flash down you are going to end up with similar power consumption, as i have previously mentioned the flash on the 583 needs to be powered down as well, if that is the question.

Thanks MT_dialog

prasanth.velliy...
Offline
Last seen:1 year 10 months ago
Joined:2016-02-18 12:18
Hi Dialog

Hi Dialog

https://wenku.baidu.com/view/20871b8127d3240c8547efd2.html
i have followed above link to use spi_flash_power_down() in DSPS_Device, but not working,...

From Beacon project , after every read / write operation spi_flash_power_down() got invoked , but in DSPS Device project i am not doing any read/write to SPI Flash, so exactly from which function i have to invoke this spi_flash_power_down() , so it will make sense.

Than you

MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
Joined:2015-06-08 11:34
Hi prasanth,

Hi prasanth,

I ve mentioned the flash power down command in order to send this kind of command to the flash in order to check if the flash its consuming the extra power that you see on your board. So you can just invoke it in order to check if the consumption will go down, if you dont see any effect then something else is consuming that extra current.

Thanks MT_dialog

wisilica
Offline
Last seen:10 months 2 weeks ago
Joined:2015-03-17 08:16
Even we did not see the power

Even we did not see the power coming down when the spi_flash_power_down() was invoked. Had to control the supply to flash via gpio, and power off flash.

prasanth.velliy...
Offline
Last seen:1 year 10 months ago
Joined:2016-02-18 12:18
Hi Dialog

Hi Dialog

Q 1 . In Our custom Board DA14580 - with external flash , i have removed all pullup register(10k) , and tested , i can not able to flash / erase SPI memory via SmartSnippets , if i put pullup in CS pin , it is working, But in beacon and smart tag designs i am not seeing any pullup in cs pin ??

Thank you Dialog

MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
Joined:2015-06-08 11:34
Hi prasanth,

Hi prasanth,

There is no pullup at the CS on the beacon or the Smart Tag or at any of the dev kits, if that is your question. A wild guess, perhaps something else is also driving the CS line, an electrical issue on the custom board perhaps, that results in inducted noise on your SPI lines ?

Thanks MT_dialog

prasanth.velliy...
Offline
Last seen:1 year 10 months ago
Joined:2016-02-18 12:18
Hi Dialog

Hi Dialog

thank you Dialog , Now i can able to use the SPI flash without pullup register.

In DSPS device project
if i invoke spi_flash_power_down() inside periph_init() in "user_periph_setup.c" , i flashed this code , my device is not advertising after some time , also after this while erasing spi flash i am facing errors , In IOT project , spi_flash_power_down() invoked while reading/writing config parameters , but in DSPS how to use this API ?

Thank you Dialog

MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
Joined:2015-06-08 11:34
Hi prasanth,

Hi prasanth,

The periph_init() is a function that is executed in every wakeup of the device, if after some point the device stalls or gives you errors you will have to check the actual reason via debugging. Anyway, there is no proper point that you will place the power down of the flash, the function should be invoked right after interfacing with the flash for example right after reading or writing data (as the IoT uses it). Now in case for some reason the flash is powered when the DSPS runs you can invoke the function in the app_on_init() callback, that should be ok.

Thanks MT_dialog

prasanth.velliy...
Offline
Last seen:1 year 10 months ago
Joined:2016-02-18 12:18
Hi Dialog

Hi Dialog

As you suggested , i am invoking the spi_flash_power_down() , in user_on_init()

void user_on_init(void)
{
// SPS application initialisation
user_scheduler_init();

default_app_on_init();
da14580_spi_flash_init();
da14580_spi_flash_deinit();
}

void da14580_spi_flash_init(void)
{

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)
{
// The device was not identified.
// The default parameters are used.
// Alternatively, an error can be asserted here.
spi_flash_init(SPI_FLASH_DEFAULT_SIZE, SPI_FLASH_DEFAULT_PAGE);
}
}

void da14580_spi_flash_deinit( void )
{
spi_flash_power_down();
}
but still i am getting 235ua during ext sleep
As menitone din smart_tag project , i have changed user_periph_setup.c

#if DEVELOPMENT_DEBUG

void GPIO_reservations(void)
{
/*
* Globally reserved GPIOs reservation
*/

/*
* Application specific GPIOs reservation. Used only in Development mode (#if DEVELOPMENT_DEBUG)

i.e.
RESERVE_GPIO(DESCRIPTIVE_NAME, GPIO_PORT_0, GPIO_PIN_1, PID_GPIO); //Reserve P_01 as Generic Purpose I/O
*/
//RESERVE_GPIO( UART1_TX, GPIO_UART1_TX_PORT, GPIO_UART1_TX_PIN, PID_UART1_TX);
//RESERVE_GPIO( UART1_RX, GPIO_UART1_RX_PORT, GPIO_UART1_RX_PIN, PID_UART1_RX);

RESERVE_GPIO( I2C_SCL, I2C_GPIO_PORT, I2C_SCL_PIN , PID_I2C_SCL); // VP
RESERVE_GPIO( I2C_SDA, I2C_GPIO_PORT, I2C_SDA_PIN, PID_I2C_SDA); // VP

RESERVE_GPIO( LED_PORT, GPIO_PORT_1, GPIO_PIN_1, PID_GPIO);

RESERVE_GPIO( SPI_CS, SPI_GPIO_PORT, SPI_CS_PIN, PID_SPI_EN);
RESERVE_GPIO( SPI_CLK, SPI_GPIO_PORT, SPI_CLK_PIN, PID_SPI_CLK);
RESERVE_GPIO( SPI_DO, SPI_GPIO_PORT, SPI_DO_PIN, PID_SPI_DO);
RESERVE_GPIO( SPI_DI, SPI_GPIO_PORT, SPI_DI_PIN, PID_SPI_DI);
/*
#if (UART_HW_FLOW_ENABLED)
RESERVE_GPIO( UART1_RTS, GPIO_UART1_RTS_PORT, GPIO_UART1_RTS_PIN, PID_UART1_RTSN);
RESERVE_GPIO( UART1_CTS, GPIO_UART1_CTS_PORT, GPIO_UART1_CTS_PIN, PID_UART1_CTSN);
#endif

#ifdef CFG_PRINTF_UART2
RESERVE_GPIO( UART2_TX, GPIO_UART2_TX_PORT, GPIO_UART2_TX_PIN, PID_UART2_TX);
RESERVE_GPIO( UART2_RX, GPIO_UART2_RX_PORT, GPIO_UART2_RX_PIN, PID_UART1_RX);
#endif
*/

}
#endif //DEVELOPMENT_DEBUG

/**
****************************************************************************************
* @brief Map port pins
*
* The Uart and SPI port pins and GPIO ports are mapped
****************************************************************************************
*/
void set_pad_functions(void) // set gpio port function mode
{

/*
* Configure application ports.
i.e.
GPIO_ConfigurePin( GPIO_PORT_0, GPIO_PIN_1, OUTPUT, PID_GPIO, false ); // Set P_01 as Generic purpose Output
*/

GPIO_ConfigurePin( LED_PORT, LED_PIN, OUTPUT, PID_GPIO, true );

GPIO_ConfigurePin(I2C_GPIO_PORT, I2C_SCL_PIN, INPUT, PID_I2C_SCL, false); // VP
GPIO_ConfigurePin(I2C_GPIO_PORT, I2C_SDA_PIN, INPUT, PID_I2C_SDA, true); // VP

//GPIO_ConfigurePin( GPIO_UART1_TX_PORT, GPIO_UART1_TX_PIN, OUTPUT, PID_UART1_TX, false );
//GPIO_ConfigurePin( GPIO_UART1_RX_PORT, GPIO_UART1_RX_PIN, INPUT_PULLUP, PID_UART1_RX, false );

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, INPUT, PID_SPI_DI, false );

/*
#if (UART_HW_FLOW_ENABLED)
GPIO_ConfigurePin( GPIO_UART1_RTS_PORT, GPIO_UART1_RTS_PIN, OUTPUT, PID_UART1_RTSN, false );
GPIO_ConfigurePin( GPIO_UART1_CTS_PORT, GPIO_UART1_CTS_PIN, INPUT_PULLUP, PID_UART1_CTSN, false );
#endif //UART_HW_FLOW_ENABLED

#ifdef CFG_PRINTF_UART2
GPIO_ConfigurePin( GPIO_UART2_TX_PORT, GPIO_UART2_TX_PIN, OUTPUT, PID_UART2_TX, false );
GPIO_ConfigurePin( GPIO_UART2_RX_PORT, GPIO_UART2_RX_PIN, INPUT, PID_UART2_RX, false );
#endif
*/

}
Also i have undef the #undef CFG_DEVELOPMENT_DEBUG
Removed the pullup in cs pin of EXT-SPI flash .

i have checked the same project in dev board , still 230uAmps , so i dont think hardware leakage is causing the current consumption

what could be the problem..........??what are the other options

Thank you

MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
Joined:2015-06-08 11:34
Hi prasanth,

Hi prasanth,

所以你有测试设备基本上没有the flash and the additional I2C components that you have on your custom board and your fw still consumes about 230uA. There is no obvious reason for that, i mean, if the device is awake when you are taking the measurements the power consumption should be much higher than 230uA. With no devices attached on the 580 (memory devices, I2C sensors, etc) the only way i can think of that could consume this kind of power is perhaps somekind of leakage through the UART pins, although i am not able to see anything like this on the DSPS reference design, have you tried remove the UART connection and check if this drops your current consumption.

Thanks MT_dialog

prasanth.velliy...
Offline
Last seen:1 year 10 months ago
Joined:2016-02-18 12:18
Hi Dilaog team

Hi Dilaog team

Thank you for your reply..

have you tried remove the UART connection and check if this drops your current consumption ??
Q1:如何删除,你的意思是在periph评论_setup.c ??

Q2: i have enabled spi_flash_power_down , in DSPS_DEVICE project , i am getting sleep current 160ua , if i disabled 176ua , i am not seeing big differences...

Q3: As you said if some other leakage is there in custom board , how to measure or find the leakage

Q4: i have used some unused GPIO pin as test points , will this cause any leakage ??

Q5 : in RFIOp for matching we have added 1.2pf and 3.9nh discrete components (in the PI network , R3 -> 1.2pf , R4 -> open , R5 -> 3.9nh) , will this cause any issues ??

Q6 : In ext sleep mode - i2c gpio are high , i am getting 3v , was it an issue ? if yes can i drive low ??