AnsweredAssumed Answered

Mutual exclusion for HAL using FreeRTOS

Question asked by Aaron Pica on Jan 18, 2017
Latest reply on Jan 23, 2017 by Sean Park

I'm going to use the different peripheral drivers (HAL) from ST with the FreeRTOS. The system will have different thread executions, and each one will use different peripherals.

The question is whether the HAL implements some kind of mutual exclusion to avoid collisions and inconsistencies. If two threads use the same peripheral (I2C1 for example) at the same time, can it be problematic? Can all the peripherals be used without any restriction from each thread?


I saw that the peripherals implement some type of LOCK mechanism, but I'm not sure if it is meant to work with multiple thread executions.


Thank you