- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am getting frequent failures where Cy_BLE_GATTS_SendIndication() returns CY_BLE_ERROR_INVALID_OPERATION .
I'm fairly certain it's not caused by the BLE stack being busy because I check the stack before call the indication function:
( cy_ble_busyStatus[cy_ble_connHandle[0].attId] != CY_BLE_STACK_STATE_FREE )
I also set a breakpoint in my genericEventHandler() at case CY_BLE_EVT_STACK_BUSY_STATUS, but that event is never received.
I've stepped through the code as far as the call to Cy_BLE_GATTS_Indication(¶m), but I can't find any source code for this function and the disassembly is not very enlightening. Does anyone know where this source code is?
After I receive CY_BLE_ERROR_INVALID_OPERATION , I can't recover and keep getting that error until I restart the MCU. I am trying to reset BLE as shown below. No errors returned, but it doesn't help.
Cy_BLE_Stop();
cy_ble_initVar = 0u; // needed to let Cy_BLE_Start do initialization
Cy_BLE_Start(genericEventHandler);
I am using PDL 3.5.1. BLE is configured in Peripheral role and Dual-Core mode (controller on CM0).
Any ideas are appreciated.
Thanks!
Solved! Go to Solution.
- Labels:
-
PSoC 6 MCU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The CY_BLE_ERROR_INVALID_OPERATION error code will be returned if the stack queue is full or for other reasons, the stack cannot process the operation.
I would suggest that:
- Please check the paramaters of Cy_BLE_GATTS_SendIndication(), to see if any wrong pointer were engaged.
- Please downgrade the PDL to several earlier versions, and then build and check if the issue still exists.
- Please burn your application to another PSoC 6 device, to test if the issue still exists.
Best regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Interestingly, this error does not occur if the BLE component is configured to be single-core, CM4. However, then I don't have enough CPU time to do other tasks.
I have attached the debugger to the CM0 core when the error occurs and it seems to be looping through Cy_BLE_ProcessEvents(). I don't see any problems there.
Perhaps there's some problem with the Inter Processor Communication?
Any ideas would be appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The CY_BLE_ERROR_INVALID_OPERATION error code will be returned if the stack queue is full or for other reasons, the stack cannot process the operation.
I would suggest that:
- Please check the paramaters of Cy_BLE_GATTS_SendIndication(), to see if any wrong pointer were engaged.
- Please downgrade the PDL to several earlier versions, and then build and check if the issue still exists.
- Please burn your application to another PSoC 6 device, to test if the issue still exists.
Best regards