Hi,
I want to implement two control systems using one stm32 microcontroller.One is temperature sensor controlled PWM1(led1) & the other is Pressure sensor controlled PWM2(led2).
So in this case shall I need to create two independent tasks for each control loop
and set the priority level same for each or anything else?
Kindly suggest the control system design principle using freertos.
There is no common design principle related to FreeRTOS.
Well, except KISS - Keep It Simple and Stupid
If you just periodically poll the sensors and adjust the associated PWMs you can easily use a single task perhaps with a vTaskDelay or something to avoid polling/adjusting too often since temperature and pressure are usually not varying very fast.
But of course you can spend a dedicated task to handle each sensor/PWM pair separately. But it might be an overkill / waste of resources.