Different power consumption DEVKIT module vs SOC

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support。We’ll be fixing bugs / optimising the searching and tagging over the coming days.
7 posts / 0 new
Last post
essele
Offline
最后一次露面:1 month 3 weeks ago
加入:2020-12-19 15:33
Different power consumption DEVKIT module vs SOC

Hi,

我刚刚使用da14531devkit-pro的一些例子开始,我有两个子板,正常的SOC一个和模块基于一个。

Using just the barebone ble example with ARCH_EXT_SLEEP_ON, on the SOC version I see a current consumption (on average) of about 1.6uA, yet on the module based one I see just over 10uA (measured using a multimeter connected to J9)

I am assuming that this is because of te flash not being properly disabled as per the following:

https://support.dialog-semicondiondiondum/forums/post/dialog-smartbond-bl ...–-software/power-down-da14531mods-spi-flash

但是......我有禁用spi_flash ...(#undef cfg_spi_flash_enable)..甚至我启用它,似乎没有任何区别。

I have tried putting an spi_flash_powerdown() in user_app_init(), however that clearly isn't going to work if flash isn't enabled, and it also doesn't work if it is ... in both cases I get a 300uA consumption and no advertising, so I'm assuming it's hanging (haven't tried debugging it yet.)

有什么我缺少的东西......其他帖子的海报似乎弄清楚了,但我看不到冬眠例中的任何东西都是有道理的。

Many thanks,

李。

Device:
mhv_dialog.
Offline
最后一次露面:1 week 6 days ago
Staff
加入:2013-12-06 15:10
Hi Lee,

Hi Lee,

All of your observations are valid. The issue is that the flash device in the module is consuming excessive power due to the state of the slave select pin (Aka chip select, spi enable, etc.). To reduce this power consumption, all you have to do is to ensure that the SS pin is kept high at every wakeup. This is managed in the functionset_pad_functions ()ofuser_periph_setup.c。对于我们的DA14586,您可以看到此(SDK示例Project Enterion_Peripheral_Template):

#if定义(__da14586__)//禁止自发da14586 spi flash唤醒gpio_configurepin(gpio_port_2,gpio_pin_3,输出,pid_gpio,true);#万一

For the DA14531 module, it should look like this:

#if defined (__DA14531__) // Disallow spontaneous DA14531 SPI Flash wake-up GPIO_ConfigurePin(GPIO_PORT_0, GPIO_PIN_1, OUTPUT, PID_GPIO, true); #endif

然后,模块和SoC之间的差异应该下降到大约300na。

/MHv

essele
Offline
最后一次露面:1 month 3 weeks ago
加入:2020-12-19 15:33
Hi,

Hi,

谢谢你的答案,但我不认为这是合适的......这个代码已经有了......

#if定义(__da14586__)//禁止自发da14586 spi flash唤醒gpio_configurepin(gpio_port_2,gpio_pin_3,输出,pid_gpio,true);#else // Disallow spontaneous SPI Flash wake-up GPIO_ConfigurePin(SPI_EN_PORT, SPI_EN_PIN, OUTPUT, PID_SPI_EN, true); #endif

......我认为哪个与您建议相同。

I've tried adjusting this to your specific code and it made no difference.

。。。I haven't read the specific datasheet for the flash, but most of them start up in non-power-saving mode don't they? So I assume you actually need to enable the flash, and then put it in power saving mode?? Or have I missed something?

李。

mhv_dialog.
Offline
最后一次露面:1 week 6 days ago
Staff
加入:2013-12-06 15:10
您的代码与

您的代码与mine except that my code directly specifies the pin.

I thought you mentioned that you had already tried to enable the flash and then put it to sleep, did I misunderstand something?

/MHv

mhv_dialog.
Offline
最后一次露面:1 week 6 days ago
Staff
加入:2013-12-06 15:10
Hi Lee,

Hi Lee,

我认为你的达成ication is probably hanging - on my module forcing a hang leads to about 250uA.

Try to start with the empty_peripheral_template project and set the sleep mode to extended sleep. Load this on the module via JTAG from Keil (attach then detach the debugger) to run the code and measure the power consumption. Do the same thing on the SoC and you should see a huge difference in power consumption (on my board it is about 1mA). Then add the hardware configuration of SPI SS as described above and repeat the measuremnent on the module. The current consumption on the SoC and the module will be almost identical.

/MHv

essele
Offline
最后一次露面:1 month 3 weeks ago
加入:2020-12-19 15:33
Hi,

Hi,

This is now solved ... it wasn't as you suggested, it was actually my complete lack of understanding of how things were initialised. I had assumed that enabling CFG_SPI_FLASH_ENABLE would be enough to properly enable the flash, but this absolutely isn't the case.

供参考,模块闪光灯(P25Q11U)的数据表清楚地显示了9uA待机电流和0.1ua深度下电流,所以几乎是900A差异,这正是我所看到的。此外,该模块将在待机模式下打开电源,需要专门放入深断电模式。

代码示例的主要问题我正在使用(ble_app_barebone)是,没有一个spi或flash初始化代码实际上是在那里的,因此cfg_spi_flash_enable实际上并不实际做任何事情,因此对spi_flash_powerdown()的调用不起作用。

A bit of further investigation into the hibernation example (as referenced in the other post that I linked in the question) and you can find all of the required code to initialise the pins, initialise SPI, and then a call to spi_flash_powerdown() in user_app_init() and everything works perfectly ... I'm actually seeing slightly less power consumption, at around 1.4uA ... but this is just with a multimeter, so may be missing peaks etc.

So this is great ... thanks.

essele
Offline
最后一次露面:1 month 3 weeks ago
加入:2020-12-19 15:33
Further ... I've just found

Further ... I've just found this that explains it all perfectly ...

http://lpccs-docs.dialog-semiconductor.com/da145xx_tutorial_sdk6_periphe...