General question for PSoC6 BLE example

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

cross mob
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Today I downloaded and installed Creator 4.2 and the PSoC6 examples and here is my first question:

In the CE220335:BLE_Eddystone project the main loop is the same for M0 and M4 CPU:

    for (;;)

    {

        /* Cy_Ble_ProcessEvents() allows the BLE stack to process pending events */

        Cy_BLE_ProcessEvents();

       

        Cy_SysPm_DeepSleep(CY_SYSPM_WAIT_FOR_INTERRUPT);

    }

My question is: Why do both CPUs handle the ProcessEvents API and which CPU handles which events???

Bob

0 Likes
1 Solution

Hello Bob,

CE220335 code examples uses the BLE stack in dual core mode:the stack is split between the two cores - CM0+ runs the controller part and maintains the connections, where as the CM4 runs the host part of the BLE stack. CM0+ handles the controller events and CM4 handles the host events and the user defined application level events. Any host level events are not processed by the CM0+ and are passed to CM4.

Both the cores have to continuously process any pending events and hence the call to the Cy_BLE_ProcessEvents in both files.

Hope this helps.

Cheers.

View solution in original post

0 Likes
2 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

No answers? Do I need to create a support case??

Bob

0 Likes

Hello Bob,

CE220335 code examples uses the BLE stack in dual core mode:the stack is split between the two cores - CM0+ runs the controller part and maintains the connections, where as the CM4 runs the host part of the BLE stack. CM0+ handles the controller events and CM4 handles the host events and the user defined application level events. Any host level events are not processed by the CM0+ and are passed to CM4.

Both the cores have to continuously process any pending events and hence the call to the Cy_BLE_ProcessEvents in both files.

Hope this helps.

Cheers.

0 Likes