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,
李。
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):
For the DA14531 module, it should look like this:
然后,模块和SoC之间的差异应该下降到大约300na。
/MHv
Hi,
谢谢你的答案,但我不认为这是合适的......这个代码已经有了......
......我认为哪个与您建议相同。
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?
李。
您的代码与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
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
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.
Further ... I've just found this that explains it all perfectly ...
http://lpccs-docs.dialog-semiconductor.com/da145xx_tutorial_sdk6_periphe...