DSPS and power consumption

8 posts / 0 new
Last post
davidra7
Offline
Last seen:1 year 6 months ago
加入:2016-09-11 13:06
DSPS and power consumption

Hi,
I am using Murata LBCA2HNZYZ-711 with DSPS with the latest SDK5 , it worked great .
我们的项目的一部分,我们需要改善c的力量onsumption.
我有几个问题/问题:
1. In the project I tried to enable CFG_POWER_OPTIMIZATIONS flag and there is no difference ,what it does?
2. I enabled the Extended Sleep and I was able to connect but the data stops to flow after approx 1 second, how I configure the wake up ?
3.My plan is to enable the sleep while the advertising and not the connected state, is there an option to enable the sleep during the advertising ?

Thanks,
David

Device:
MT_dialog
Offline
Last seen:2 months 6 days ago
Staff
加入:2015-06-08 11:34
Hi davidra7,

Hi davidra7,

1. The CFG_POWER_OPTIMIZATIONS is a series of improvements throughout the SDK 5 regarding the sleeping time calculation and the power management and this should be enabled by default in the DSPS and the SDK.

2. When you operate under extended sleep you cant use the debugger, you will have to stop debugging. The debugger doesn't let the 580 to fall to sleep.

3.这is allready implemented, DSPS sleeps between advertising intervals as well as between the connection intervals. Just by setting the project in extended sleep mode you should be able to see this.

Thanks MT_dialog

davidra7
Offline
Last seen:1 year 6 months ago
加入:2016-09-11 13:06
Hi,

Hi,
Thanks for fast answer I really appreciate it!

In question 2 I might explain my self wrong, the problem is not part of the debugging.
our product has 3 states:
1. standby.
2. connected.
3.connected and sending data,

when the extended flag is on states 1 & 2 works great, but stage 3 stops working after 1 second. the data start to flow to the android device and stops.
The solution is to disable the sleep function after connected state ? or you might have a different solution ?
How can I disable the sleep after connection?

Another small question just to know , Enabling extended sleep done by the next 2 steps:
1. #undef CFG_MEM_MAP_EXT_SLEEP -> #define CFG_MEM_MAP_EXT_SLEEP
2. set app_default_sleep_mode to ARCH_EXT_SLEEP_ON ?

Thanks,
David

MT_dialog
Offline
Last seen:2 months 6 days ago
Staff
加入:2015-06-08 11:34
Hi davidra7,

Hi davidra7,

I dont really get what you mean, the DSPS code, when connected, checks if there is data in the DSPS buffers if there are data it disables sleep automatically in order to listen to the UART port and push data in the sending buffer. If there is no data in the buffers the sleep is enabled again and the device falls to sleep between the connection intervals, So even if the sleep flag is enabled (ARCH_SLEEP_OFF) the fw will automatically switch between sleep mode and disable sleep. This is the current functionallity of the DSPS. Now, since you say that you can start advertise, connect and then start sending data, but after one second the device stalls, most probably you are trying to debug the code while the device is in sleep mode. Just download the code and exit debugging procedure and try to connect and send data to your phone. You can only use the debug feature while the device is not in sleep mode.

Regarding the 2nd question the first definition you mention is for the memory configuration of the 580, either for extended sleep (used when no sleep is used) or deep sleep. For enabling the extended sleep all you have to do is change the app_default_sleep_mode to ARCH_EXT_SLEEP_ON.

Thanks MT_dialog

davidra7
Offline
Last seen:1 year 6 months ago
加入:2016-09-11 13:06
Hi,

Hi,
I will try to explain what I am doing, I compile the DSPS and get the HEX file and only then I program it using the smart snippets.
I don't debug during the sleep(I can't) , I works great if sleep not active but if sleep active it stops to transfer after approx. 1 second.
maybe it will help but we send packet in 250hz rate , maybe we need to change some parameters ?

Thanks !!
David

MT_dialog
Offline
Last seen:2 months 6 days ago
Staff
加入:2015-06-08 11:34
Hi davidra7,

Hi davidra7,

I get the part that you compile and download the code through smart snippets. What i dont get is the sending of a packet in 250Hz rate, what do you mean ? The DSPS will take data from the UART and pass it on the other side as fast as it can. I dont see any reason why it would stop transmition after 1 second when in sleep mode, what i can think of is perhaps something is wrong with the HW flow control, have you made the proper connections in order for the device to use the HW flow control, also have you configured your terminal in RTS/CTS mode ? Does the device stays connected after it stops the transmittion or the device stalls?

Thanks MT_dialog

davidra7
Offline
Last seen:1 year 6 months ago
加入:2016-09-11 13:06
Hi,

Hi,
I configured the RTS & CTS. everything works perfectly when app_default_sleep_mode = ARCH_SLEEP_OFF.

The problem starts when app_default_sleep_mode = ARCH_EXT_SLEEP_ON.

When the problem happens the Murata stops transferring/getting data , it seems like the Murata stopped working.

Note: I am using an external microcontroller that connected to the Murata thorugh Uart.

We send Approx. 4KB in 1 second.

Thanks,
David

MT_dialog
Offline
Last seen:2 months 6 days ago
Staff
加入:2015-06-08 11:34
Hi davidra7,

Hi davidra7,

Can you see from the power profiler if the connection between the devices still holds or the fw crashes completely ? Check if you can see the connection events in the power profiler, if there are connection events means that for some reason the 580 doen't get the data over the UART, if there is no activity (only a straight line, no peaks that indicate that there is a valid connection) means that something went wrong in the software, either the system issued a reset or you 've hitted a hardfault or an NMI Handler or there is an ASSERT. In order to check this out you will have to use the debugger in order to investigate the reason.

How much data you send over UART i dont think that has something to do with the fact that the device stalls, if the device cant cope with the data you send, it will stop the UART transmition via the flow control. Try to use a standard PC and the android application on the other side to check if has something to do with external micro that you ve attached.

Thanks MT_dialog