- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
From my understanding, BLE subsystem (BLESS) runs concurrently with the main loop in the main() function. If both share a variable, is it possible to get a race condition? If it is possible, how to prevent it? Does PSoC creater supplies a mutex like object that we can use to lock/unlock?
Solved! Go to Solution.
- Labels:
-
BLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Yes BLESS and main runs parallel.All the BLE events will automatically call the BLE event handler. All processes will be updated to the stack while CyBleProcessEvents( ) is called. All the updates happens after this based on the BLE packets. If the code is written in the way as mentioned in the code examples, race conditions will not occur.
Thanks,
Hima
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Yes BLESS and main runs parallel.All the BLE events will automatically call the BLE event handler. All processes will be updated to the stack while CyBleProcessEvents( ) is called. All the updates happens after this based on the BLE packets. If the code is written in the way as mentioned in the code examples, race conditions will not occur.
Thanks,
Hima