cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

BiKa_2115371
New Contributor II

Hi there,

My code -running on a PSoC 4200BLE 4248 family- stuck randomly on mail loop CyBle_ProcessEvents() calling. The priority of BLE Interrupt is the highest possible (0). This malfunction disappeared if the deep sleep mode is disabled, of if my BLE Event handling routine is empty (no functional BLE). When code is stucking my BLE handling routine does not executed at all.

Any glue about it?

Regards

Bill

0 Likes
1 Solution
BiKa_2115371
New Contributor II

Good morning GaneshD,

let me apologize for my delayed answer but, I was delving on this very disturbing situation of CPU stuck.

Finally I managed to find out the reason for CPU stucking. Actually there were 3  (yes three!!) reasons:

1. A forgotten CyDelay(20). It seems that 20 ms delay is not permittable for BLE in wake up from Deep Sleep mode

2. Wrong Power CPU handling at CYBLE_BLESS_STATE_EVENT_CLOSE state

3. Writing on FLASH (the FLASH clock is gated at Deep Sleep)

I hope my flaws could be valuable for other developers

Best Regards

Bill

View solution in original post

0 Likes
2 Replies
VenkataD_41
Moderator
Moderator

Hi Bill,

Please program your board with the BLE_Findme code example available in PSoC Creator code examples section to check whether there is some issue with the hardware you are using. This code example will work flawlessly.

If the above code example works, your hardware is fine. Have you gone through BLESS deep sleep code example? If yes, please check whether your firmware flow is according to the flow in example project.

https://www.cypress.com/documentation/application-notes/an92584-designing-low-power-and-estimating-b...

If you have followed the flow and still if you are seeing issue then, please comment the events in Eventhandler function and check which event is causing the issue.

If possible please attach your project here. We will check it at our side.

Thanks

Ganesh

0 Likes
BiKa_2115371
New Contributor II

Good morning GaneshD,

let me apologize for my delayed answer but, I was delving on this very disturbing situation of CPU stuck.

Finally I managed to find out the reason for CPU stucking. Actually there were 3  (yes three!!) reasons:

1. A forgotten CyDelay(20). It seems that 20 ms delay is not permittable for BLE in wake up from Deep Sleep mode

2. Wrong Power CPU handling at CYBLE_BLESS_STATE_EVENT_CLOSE state

3. Writing on FLASH (the FLASH clock is gated at Deep Sleep)

I hope my flaws could be valuable for other developers

Best Regards

Bill

View solution in original post

0 Likes