Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
11 years, 7 months ago.
Are digital pins rtos safe?
So I'm working on writing a RTOS application that has GPS, Bluetooth, LEDs, etc. All of these things are on different pins, but am I going to have a problem with one thread turning one LED on(say PTE1) and another doing something with another pin on the same port(say PTE2)?
1 Answer
11 years, 7 months ago.
No, actions on one pin should not affect any other pin, regardless of the port they are on.
Maybe there is a communication error, but I mean do I need a mutex in my rtos for each port?
posted by 17 May 2013Ah like that.
I haven't used RTOS myself, but if I understand it correctly you should not need a mutex for each port. Each pin of a port is controlled completely independent of other pins. Only if you would use a pin for several purposes you would need a mutex for it (that won't happen often, but there are some use cases for it).
But the tl;dr is that writing/read/setting mode of one pin should have no influence/dependence on other pins, so from what I understand then a mutex is not required.
posted by 17 May 2013