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.