Announcements

Equip yourself to optimize PSoc4 MCUs for Evs at the EV Webinar. Click here to register.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

PSoC™ 4 Forum Discussions

Anonymous
Not applicable

Hello users,

When using the function CyBle_GappSetNumOfAdvPkts() to send a fixed number of advertisement packets out from the device wirelessly, the BLESS ends up being stuck in the "ACTIVE" mode, and refuses to go to power saving mode indefinitely. The documentation doesn't mention any requirements to what the user needs to do upon completion to "clean up". Is there another API call/function that I'm missing? I'm checking the BLESS state and attempting to enter low-power-mode when not actively processing in main().

I am checking the return value and it is giving CYBLE_ERROR_OK, as well as physically sending out the number of packets requested (the ADVERTISEMENT_START_STOP also fires when it finishes as well.)

Do I need to reset the BLESS? Or just reset the chip?

0 Likes
1 Solution

Fixed this issue in BLE component version 3.54.

-Gyan

View solution in original post

0 Likes
9 Replies
himam_31
Employee
Employee
50 likes received 25 likes received 10 likes received

Hello,

1)Did you use CyBleProcessEvents( ) after CyBle_GappSetNumOfAdvPkts().

2)Are there any other high priority interrupts?

Thanks,

Hima

0 Likes
Anonymous
Not applicable

1) I am periodically calling the CyBleProcessEvents() inside the main loop before checking the BLESS states, and after sending commands to the BLESS to do activity. This includes the CyBle_GappSetNumOfAdvPkts():

I am calling:

     CyBleProcessEvents(),

     <Other code>,

     CyBle_GappSetNumOfAdvPkts(),

     CyBleProcessEvents(),

     <Loop again, or go to low power mode>

2) I have the BLE_bless_isr set to priority 2, and all other priorities set to 3 (ADC_IRQ, ADC_ISR, Button_ISR, WDT_ISR)

0 Likes
Anonymous
Not applicable

The BLESS stays in active mode for seconds (minutes if I let it) without leaving the active mode, and seems to only be caused by the CyBle_GappSetNumOfAdvPkts() function. (The unit loops through the main code I replied in my other comment during this time, so I think it is unlikely it is a failure to call the CyBleProcessEvents() unless there is more stringent requirements for the timing to do so.

0 Likes
Anonymous
Not applicable

Hi E Pratt,

Can you share the project, so that we can take a look at this behavior?

Thanks,

Ranjith

0 Likes
Anonymous
Not applicable

Not publically, no. But I'll open a case and share the code through support so you can view the problem.

0 Likes
Anonymous
Not applicable

I have created the case: 00437025 with the project in it for inspection. The case details point out the line used to workaround the issue, and commenting/uncommenting that line will cause the issue to appear/disappear.

0 Likes

Fixed this issue in BLE component version 3.54.

-Gyan

0 Likes

Dear Gyan,

This fix that you've made to the BLE component in version 3.54 is not available to us. We can only download version 3.4 (that's the most updated version available via the PSOC IDE version 4.1 Update 1).

How can we get your version?

Thanks,

David

0 Likes

Hello David,

Could you please download the latest version of PSoC Creator from below link and update the BLE component to latest version.

https://www.cypress.com/products/psoc-creator-integrated-design-environment-ide

-Gyan

0 Likes