We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
The two options are available.
What is the difference in respect of "cost" "speed" and "complexity" for the two method?
When we need more than few mutexs like that, say 100, is the answer different?
There are several limitations with the bit-band method:
- the semaphore data are limited to bit type. With exclusive accesses you can have byte, halfword and word size. (For simple mutex operations bit data is fine).
- Since bit band data is limited to 32-bit, and use each bit for each application task, so limited to 32 tasks to share the data. Exclusive accesses don't have this limitation.
- Bit band can only be used in bit band regions. Exclusive accesses can be used in other memory space.
- Bit band is not supported in Cortex-M7 processor (chip designer can add bit band on the peripheral space using additional bus level component).
In terms of cost and speed they are fairly similar. Given that semaphore and mutex don't happen frequenctly, even if one of the methods is faster the benefit is small.
In terms of complextity, you can do bit band easily with C, and for exclusive accesses you need to use intrinsic functions.
Hope this helps.
regards,
Joseph
Thanks. Understood.
Hi amiry,
I think you have gotten answered by Joseph. If it is correct, please click "Correct Answer" for the Joseph's answer and close this post.
Best regards,Yasuhiko Koumoto.