Hello Everyone,
In Start to study the ThreadX RTOS a few month ago and i came across with a thrick situation?
In my application I have one thread to execute some routines ( PWM, AD...), and another thread just for comunication (UART) When I´m tansmitting data over the uart, as the transmited data size in about 1Kb I decided to create a Critical section to avoid the change of context in the middle of the transmittion, however i couldn't find any reference of a critical section implementation on the threadX manual. After searching over the renesas rulz i found a post with the following command:
#define EnterCriticalSection() clrpsw_i()
#define ExitCriticalSection() setpsw_i()
Which, if I understood it right, should turn off the interruptions. As the UART driver implemented on SSP already uses a set of interruptions to transmite and receive data. My question is:
If I use this commands, Will it also turn off the UART internal interruption leading the UART to stop working?
Is there any other way to create create a critical section(turn off the scheduler to avoid change of context)?
Thank you for everyone support in advance