cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

Anonymous
Not applicable

The project started as is on PROCBLE is not working.

   

I'm not surprised.Application is switched into deep sleep mode, but WDT ( the only one who can wake up) is not started.

   

Does anyone know how this project supposed to work?

   

LowPower.c:

   

line62: inline void System_ManagePower()

   

interruptStatus  = CyEnterCriticalSection();

   

CySysPmDeepSleep();

   

CyExitCriticalSection(interruptStatus );

   

This will never wakup

0 Likes
Reply
1 Solution
Anonymous
Not applicable

Assuming the project you are talking about is the Project #27 BLE_Power_Measurement.

   

WDT is not the source of wakeup here, but the BLE Link Layer (LL) timer. It is responsible for waking up the system at the pre-calculated time before advertising or next connection interval.

   

So when you put the system to low power mode, the BLE LL timer is still running and will cause an interrupt to the system whenever the counter value is received.

   

The cases when the BLE LL timer will not be running are:

   

1) The advertisement has timed out. I see that the project has ADV timeout set as 65000 seconds, which is a big value (about 18 hours).

   

2) This device was connected to another BLE device and then it got disconnected as well as the BLE advertisement was not restarted before calling the low power code.

   

3) BLE component is stopped or was never started.

   

Have you done any kind of change in the project? Did you enable the 'DEEPSLEEP_ONLY' or 'SLEEP_ONLY 'macro in the project?

View solution in original post

0 Likes
Reply
5 Replies
Anonymous
Not applicable

Project number is wrong. it's day27_BLE_POWER.....

0 Likes
Reply
Anonymous
Not applicable

Assuming the project you are talking about is the Project #27 BLE_Power_Measurement.

   

WDT is not the source of wakeup here, but the BLE Link Layer (LL) timer. It is responsible for waking up the system at the pre-calculated time before advertising or next connection interval.

   

So when you put the system to low power mode, the BLE LL timer is still running and will cause an interrupt to the system whenever the counter value is received.

   

The cases when the BLE LL timer will not be running are:

   

1) The advertisement has timed out. I see that the project has ADV timeout set as 65000 seconds, which is a big value (about 18 hours).

   

2) This device was connected to another BLE device and then it got disconnected as well as the BLE advertisement was not restarted before calling the low power code.

   

3) BLE component is stopped or was never started.

   

Have you done any kind of change in the project? Did you enable the 'DEEPSLEEP_ONLY' or 'SLEEP_ONLY 'macro in the project?

View solution in original post

0 Likes
Reply
Anonymous
Not applicable

Thanks for info. I was partially aware what this example is doing, because of no description (except the details of current measurement).

   

I didn't connect the device over BLE link. I'm just trying what You've already answered what is the source of deep sleep wake up.

   

I'm doing the same with Project 38.  And after deep sleep, the only code I can stop during debugging are CySysPmSleep(void) andCY_ISR(CyBLE_Bless_Interrupt)

   

It looks, that chip don't get woken up in both of these projects OR the debugger gets lost

0 Likes
Reply
Anonymous
Not applicable

No I haven't makde any changes . Except in project #38 ( change published here on this forum)

0 Likes
Reply
Anonymous
Not applicable

Ahh, so it seems you running the project in debugger mode and then checking the operation.

   

The breakpoints in debugger mode do hit the CyPmSleep code when used along with low power project. I don't remember the exact reason now, but Bob had provided a really good explanation on this. I''ll try to find and post that here.

   

For now, use CySmart PC tool to detect advertising as well as connection.