Motor Control for Propulsion System Related Sections AuxUnit - RTOS Configuration: For details on task scheduling related to motor control. Software solution Static Architecture Dynamic Architecture CalculateMotorsSets()CalculateMotorsSets()Task_1Task_1Task_2Spi_HwSpi_HwPwm_HwRTOS_QueueRTOS_QueueRTOS_QueueRTOSTask_1Task_2Spi_HwPwm_HwRTOS_QueueRTOSRTOSTask_1Task_1Task_2Task_2Spi_HwSpi_HwPwm_HwPwm_HwRTOS_QueueRTOS_QueueTask_1Task_1Task_2Spi_HwSpi_HwPwm_HwRTOS_QueueRTOS_QueueRTOS_QueueStartTask_1SetNewValues()SpiReadIt()loop[infinite]GetLastValues()UpdatePwm()MessRxCompleted()SetNewValues()SpiReadIt()CalculateMotorsSets()CalculateMotorsSets()Task_1Task_1Task_2Spi_HwSpi_HwPwm_HwRTOS_QueueRTOS_QueueRTOS_QueueRTOSTask_1Task_2Spi_HwPwm_HwRTOS_QueueRTOSRTOSTask_1Task_1Task_2Task_2Spi_HwSpi_HwPwm_HwPwm_HwRTOS_QueueRTOS_QueueTask_1Task_1Task_2Spi_HwSpi_HwPwm_HwRTOS_QueueRTOS_QueueRTOS_QueueStartTask_1SetNewValues()SpiReadIt()loop[infinite]GetLastValues()UpdatePwm()MessRxCompleted()SetNewValues()SpiReadIt() Detailed Design MotorCtrlExecutePeriodic()MotorCtrlExecutePeriodic()Get latest power requestsCalculate new PWM valuesApply new PWM valuesnomotor<MOTORS_NUMBER?yesmotor++yesitem succesfully rceived from queue?noMotorCtrlExecutePeriodic()MotorCtrlExecutePeriodic()Get latest power requestsCalculate new PWM valuesApply new PWM valuesnomotor<MOTORS_NUMBER?yesmotor++yesitem succesfully rceived from queue?no ReceiverCallRxCompleted()ReceiverCallRxCompleted()Set the xHigherPriorityTaskWoken to True,when higher Prio Task scheduledNotify Receiver main functionImmediately switch context,if xHigherPriorityTaskWoken set to True,portYIELD_FROM_ISR(xHigherPriorityTaskWoken)ReceiverCallRxCompleted()ReceiverCallRxCompleted()Set the xHigherPriorityTaskWoken to True,when higher Prio Task scheduledNotify Receiver main functionImmediately switch context,if xHigherPriorityTaskWoken set to True,portYIELD_FROM_ISR(xHigherPriorityTaskWoken) ReceiverExecute()ReceiverExecute()Request Asynchronous SPI readWait for the SPI finish notificationulTaskNotifyTake()xQueueSendToFront()ReceiverExecute()ReceiverExecute()Request Asynchronous SPI readWait for the SPI finish notificationulTaskNotifyTake()xQueueSendToFront()