How to do dual core sleep with BLE

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
EdHa_4455331
Level 5
Level 5
25 replies posted 25 sign-ins 10 replies posted

I'm running a system that has a BLE stack running on the CM0+ core and a main application running on the CM4 core. The main application needs to be able to put both cores into sleep mode. I suppose I have to set up some form of inter-core communications and send a request from CM4 side to the CM0+ side requesting the CM0 core put itself to sleep. Anybody have a recommendation/example of how to do that? And how to wake up the CM0 core once the CM4 core wakes up on an interrupt?

Thanks,

Ed H.

0 Likes
1 Solution

Hello,

In the firmware, CM0p will enable CM4 core and then you can put the CM0p Core into deepsleep mode. You can refer to the 'CE212736 PSoC6BLE FindMe' code example for more information.
If CM4 app needs to wake up the CM0+ core then you can use the IPC to send some message to the CM0p. When it gets the notification on the pipe, it will wake up. Please refer to the 'CE223820 – PSoC 6 MCU IPC Pipes' code example for more information.

Thanks,
P Yugandhar.

View solution in original post

0 Likes
3 Replies
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hello,

Both CM0+ and CM4 can enter DeepSleep, the BLESS interrupt (that triggers every Advertisement/Connection interval) is a DeepSleep interrupt and is capable of waking up the cores from DeepSleep. If you select the "Dual-core architecture" for BLE, then CM0+ (controller) wakes-up CM4 (Host) through the IPC SystemPipe, whenever there is a need to process data on the host side. Please refer to the AN215671 - PSoC 6 MCU - Firmware Design for BLE Applications datasheet for more information.
Please refer to the 'CE212736 PSoC6BLE FindMe' code example from the PSoC Creator for more information.

Thanks,
P Yugandhar.

0 Likes

Thank you, but that doesn't help at all. That is not what I am trying to do. The user pushes the "off" button. To the outside world, the system will act like it is turned off. Before going into the sleep state, the CM4 app shuts down the BLE system. It then needs to put the CM0+ into a sleep state (which I don't know how to do). The CM4 will wake up when the "on" button is pressed (which generates the CM4 wakeup interrupt). The CM4 app then needs to wake up the CM0+ core (which I don't know how to do). The main CM4 app then restarts the BLE system.

0 Likes

Hello,

In the firmware, CM0p will enable CM4 core and then you can put the CM0p Core into deepsleep mode. You can refer to the 'CE212736 PSoC6BLE FindMe' code example for more information.
If CM4 app needs to wake up the CM0+ core then you can use the IPC to send some message to the CM0p. When it gets the notification on the pipe, it will wake up. Please refer to the 'CE223820 – PSoC 6 MCU IPC Pipes' code example for more information.

Thanks,
P Yugandhar.

0 Likes