Thread model of CYW20719

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

cross mob
Anonymous
Not applicable

I have a few questions on how threading is done on the CYW20719.

1) Approximately how many threads are typically active? I know of the "Application thread" (our code), and the "Idle thread" that manages the watchdog timer.

2) Which thread runs APPLICATION_START(), the BT management callback, the GATT callback, timers, etc? Are multiple threads used for each?

3) If data is shared between these various functions, when should I start using mutexes to protect it?

Nicholas

0 Likes
1 Solution
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

Hi Nicholas,

1) It depends upon your application. There can be more than one thread active at a time (especially if you have multiple audio BT profiles in your application).

2) Yes, it will be running on multiple threads and all this are taken care by the ROM FW code.

3) If you are asking about the call back functions in WICED , the shared data protection is taken care by the ROM firmware, you need not have to do anything.

If in your application you want to run custom threads and want to share data, then you may have to take care of mutexes in the application code.

Thanks & Regards,

Anjana

View solution in original post

1 Reply
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

Hi Nicholas,

1) It depends upon your application. There can be more than one thread active at a time (especially if you have multiple audio BT profiles in your application).

2) Yes, it will be running on multiple threads and all this are taken care by the ROM FW code.

3) If you are asking about the call back functions in WICED , the shared data protection is taken care by the ROM firmware, you need not have to do anything.

If in your application you want to run custom threads and want to share data, then you may have to take care of mutexes in the application code.

Thanks & Regards,

Anjana