cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

Anonymous
Not applicable

Can anyone explain this behavior?  Using CY8CKIT-042-BLE-A Pioneer Kit running the PSoC_4_BLE_CapSense_Proximity Example and commenting out the #define ENABLE_LOW_POWER_MODE to disable low power mode so advertising occurs from reset and does not time out after 30 seconds appears to stop notification data from being sent.  Notifications are enabled in CySmart by writing and reading the CCCD value 01:00 to handle 0x000F but no CapSense data is present for the CapSense characteristic attribute (0x000E).  The Notify property even shows a check mark under Enabled on the right side of CySmart.

What I want to do is avoid having to manually press the user button to start advertising and just have advertising start from reset.  Just disabling Low Power Mode starts advertising from reset but then there is no notification data.  Why should disabling low power mode stop notifications?

0 Likes
Reply
1 Solution
Anonymous
Not applicable

As ntanntan​pointed out, you could comment out the if statement or change it to

if(CYBLE_BLESS_STATE_EVENT_CLOSE == CyBle_GetBleSsState()).

When low power is enabled, the BLESS transitions between many states amongst which ECO_STABLE is one. However, when low power is disabled, the BLESS state remains EVENT_CLOSE and never transitions to ECO_STABLE which is why the if statement will never return true.

To answer the questions about ECO, it is used to obtain timing for BLE communication. It will be always ON if low power is not used. ECO will be turned OFF and ON when low pwoer is used. The CyBle_EnterLPM() will take care of this.

View solution in original post

4 Replies
NoriakiT_91
Employee

I have confirmed in my side that the notification does not work when the ENABLE_LOW_POWER_MODE macro is not defined.

I also confirmed that the notification works when commented out the "if statement" at line 149 of the "main.c" file.

GS003233.png

In the HandleLowPowerMode() funtion of the HandleLowPower.c file the ECO is controlled only when the "LOW_POWER_MODE"  I assume that ECO does not work in non "LOW_POWER_MODE"

Can anyone investigate more ?

Regards,

Noriaki

0 Likes
Reply
Anonymous
Not applicable

The ECO is required for running the BLE module iirc. And it should be able to run with and without low-power mode.

Try changing the CYBLE_BLESS_STATE_ECO_STABLE to (CYBLE_BLESS_STATE_ECO_ON || CYBLE_BLESS_STATE_ECO_STABLE)?

0 Likes
Reply
Anonymous
Not applicable

That is my understanding as well, from the SoC datasheet, the EOC (external crystal oscillator) is used to insure frequency accuracy of BLE communications with another device:

The ECO is used as the active clock for the BLE subsystem to meet the ±50-ppm clock accuracy of the Bluetooth 4.2 Specification.

I would think that clock should be stable before enabling BLE communication.. I don’t fully understand the relationship between Low_Power_Mode and the ECO clock. From the test that ntan performed it would appear that clock is not stable without entering Low_Power_Mode but as e.pratt points out it should be stable regardless.

Sent from Mail for Windows 10

0 Likes
Reply
Anonymous
Not applicable

As ntanntan​pointed out, you could comment out the if statement or change it to

if(CYBLE_BLESS_STATE_EVENT_CLOSE == CyBle_GetBleSsState()).

When low power is enabled, the BLESS transitions between many states amongst which ECO_STABLE is one. However, when low power is disabled, the BLESS state remains EVENT_CLOSE and never transitions to ECO_STABLE which is why the if statement will never return true.

To answer the questions about ECO, it is used to obtain timing for BLE communication. It will be always ON if low power is not used. ECO will be turned OFF and ON when low pwoer is used. The CyBle_EnterLPM() will take care of this.

View solution in original post