I see a Connection Termination Notification event received, but we don;t know the reason from where this came from.
Do you have a BLE Sniffer? If yes, that may help us to know the exact reason for the disconnection (master initiating it, supervision timeout, internal firmware event).
If no, I would suggest creating a technical support case at www.cypress.com -> "Design Support" -> "Support" -> "Create a Support Case". You need to be registered to create the case. The technical team will help you with solving the issue.
For anyone who may view this thread and wonder on the outcome:
An issue was found in the Project #38 code that was causing the issue. A Cypress employee stated the project code would be updated at some point in the future. The change consists of 2 additional lines of code. I've checked and verified that it fixes my issue, so hopefully this will work universally.
The change is located in the file Init.c, in the function WCO_ECO_LowPowerStart(), the new lines of code should be inserted before line 143 and after line 145 so that the code block looks like this:
/* Start code snippet */
CySysWdtUnlock(); (void)CySysClkWcoSetPowerMode(CY_SYS_CLK_WCO_LPM); /* Switch WCO to the low power mode after startup */ CySysClkSetLfclkSource(CY_SYS_CLK_LFCLK_SRC_WCO); /* LFCLK is now driven by WCO */ CySysClkIloStop(); /* WCO is running, shut down the ILO */ CySysWdtLock(); /* End code snippet */
The explanation is as follows, the code on those lines was not taking affect due to the Watchdog Timer (WDT) subsystem lock system preventing the modifications. No changes can be made to the low frequency (LF) clock with the WDT subsystem lock enabled as the WDT clock uses the LF clock.
I think it should be after the line 143 and before line 145, unless You have two code snippets
Otherwise it's unlogic
I've modified the original code like You described above. Programmed the kit. And still not able to debug. The stack is full of hidden functions.
And the end is CySysPmSleep(void). Start of stack is CyBle_ProcessEvents().
Sometimes the call stack end on CY_ISR(CyBLE_Bless_Interrupt);
I'm not able to catch breakpoint anywhere else.
1 of 1 people found this helpful
The fix to this project was to correct an issue that prevented proper BLE connections when changing the BLE role from unconnectable broadcaster to connectable peripheral. This was not about a debug issue.
If you have a debug issue, I suggest you submit a new thread to make it more likely for others to see your issue and assist. It is also usually helpful to attach your project so others can recreate your issue.