cancel
Showing results for 
Search instead for 
Did you mean: 

WICED Studio Bluetooth

Contributor II

I am using the CYW20719 dev kit with WICED Studio and I have some questions regarding preemption.  I am not calling any RTOS functions.  Can any of my functions be preempted by callbacks?  When I register for interrupts like for PUART, GPIO, and timer, does the callback function preempt my function that is currently executing like the Bluetooth Management Event Handler?  I am controlling the 20719 from another processor through PUART.  Do I need to create a thread with a main loop for this type of design or is all my code already running in its own thread including interrupt callbacks?  If this is the case, is there a priority of callback execution for the interrupts or BT events?

0 Likes
Reply
1 Solution
Moderator
Moderator

Hello,

This will be automatically taken by the ROM firmware.

BT events will be having higher priority than the application (mpaf) thread. So BT functions won't get effected because of other application interrupts.

Regards,
Anjana

View solution in original post

0 Likes
Reply
5 Replies
Moderator
Moderator

Hello,

This will be automatically taken by the ROM firmware.

BT events will be having higher priority than the application (mpaf) thread. So BT functions won't get effected because of other application interrupts.

Regards,
Anjana

View solution in original post

0 Likes
Reply
Contributor II

Thanks.  Will any of my application functions like PUART interrupt handler be preempted by the BT callback function?  I would like to disable all preemption of my application functions if possible.

0 Likes
Reply
Moderator
Moderator

Both the application interrupts and bluetooth management events will be taken care by the Firmware. There is expected delay in execution of interrupts because of RTOS functionalities but the application interrupt handler has guaranteed execution.

Contributor II

I am modifying the same global variables in the BT event handler and the PUART interrupt handler.  Do I need critical sections or mutexes to protect these variables?

0 Likes
Reply
Moderator
Moderator

Q) Do I need critical sections or mutexes to protect these variables?

A) No , you do not have to protect the variables.

0 Likes
Reply