1)Did you use CyBleProcessEvents( ) after CyBle_GappSetNumOfAdvPkts().
2)Are there any other high priority interrupts?
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:
<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)
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.
Hi E Pratt,
Can you share the project, so that we can take a look at this behavior?
Not publically, no. But I'll open a case and share the code through support so you can view the problem.
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.
Fixed this issue in BLE component version 3.54.