BLE on dual core

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

cross mob
SaGa_4641021
Level 4
Level 4
50 questions asked 50 replies posted 100 sign-ins

When you setup BLE on 2 cores,

in core M0+, it has these 2 functions:

"Cy_BLE_Start(0)" and "Cy_BLE_ProcessEvents()" as follows:

int main(void)
{
__enable_irq(); /* Enable global interrupts. */
Cy_BLE_Start(0);
Cy_SysEnableCM4(CY_CORTEX_M4_APPL_ADDR);

for(;;)
{
Cy_BLE_ProcessEvents();
}

}

 

These 2 functions are redundant in CM4, where they are called as follows:

Cy_BLE_Start(genericEventHandler);

for(;;)

{

Cy_BLE_ProcessEvents();

}

 

The questions are:

-Why we redundantly call the functions from 2 cores ?

-If I need to run BLE without interrupting its service, while i need to loop other tasks, without using RTOS. What is the efficient method to use ? for example if I need to run the BLE on one core, and other tasks on another core, i need to send data by BLE. How can I trigger the BLE for data transfer ? can I use an interrupt across the 2 cores ? i don't think IPC supports transferring interrupts

thanks

0 Likes
1 Solution
BragadeeshV
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hi @SaGa_4641021 ,

Are you using PSoC Creator or Modustoolbox? Looks like you are using PSoC Creator. In case of PSoC Creator, if you use dual mode, then the host runs on CM4 and the controller portion is implemented in the CM0+ and you are expected to process both these events individually in each of the cores. That is why you need to start the component and process them separately in both the cores. The component already implements an IPC channel to transfer messages between the two cores. Please check component datasheet and middleware library for details.

Usually in the Cm0+ you can put the device to deep sleep and it will automatically wake up on BLE event. This inturn will wake the Cm4 host. See PSoC 6 BLE Find me for example.

Regards,
Bragadeesh

View solution in original post

0 Likes
1 Reply
BragadeeshV
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hi @SaGa_4641021 ,

Are you using PSoC Creator or Modustoolbox? Looks like you are using PSoC Creator. In case of PSoC Creator, if you use dual mode, then the host runs on CM4 and the controller portion is implemented in the CM0+ and you are expected to process both these events individually in each of the cores. That is why you need to start the component and process them separately in both the cores. The component already implements an IPC channel to transfer messages between the two cores. Please check component datasheet and middleware library for details.

Usually in the Cm0+ you can put the device to deep sleep and it will automatically wake up on BLE event. This inturn will wake the Cm4 host. See PSoC 6 BLE Find me for example.

Regards,
Bragadeesh
0 Likes