Can you please attach the project in which you have done the modifications?
some more observations that may be helpful:
On my mobile I use the CySmart app to communicate with the board. The board has a CYBLE-416045-02.
After power-up of the board, the CySmart app shows the Find Me Target.
1) If I do nothing on the mobile, no connection, then the board switches the outputs off after 30s
2) If I tap onto the Find Me Target on the mobile so that the services are shown, then the outputs stay on. Not even needed to enter anything, it is enough to connect to the Find Me Target.
3) When I then disconnect Bluetooth on the mobile after step 2, the outputs switch off after 30s.
4) When running in the debugger, the outputs switch to off and back to on again every 30s.
5) When the function call Cy_BLE_ProcessEvents() is commented out, no flickering happens (but nothing else too...)
I think it has something to do with a connection timeout of BLE or with sleep mode. I am just starting with BLE, so I could use some help here.
What I need is that I have full control of the inputs and outputs and that they are not affected by other things going on.
After some more testing the problem could be fixed.
I did not yet exactly understand what happened, but the problem disappeared after I removed all control registers from the project. Now I access all output pins directly with the functions Cy_GPIO_Set, Cy_GPIO_Clr etc.
It seems that the use of the same control register on both processors CM0+ and CM4 is not safe.