2023-05-22 05:12 AM
Hello,
I have an issue with event flag I am setting this flag inside ISR of GPIO pin interrupt and there is a task wait for this flag but even if the interrupt is come and set the event flag the task still in blocking mode this my code :
void MXT_vidTask(void * pvidArgument)
{
while(1)
{
// wait for the u32TOUCH_FLAG_MASK (cleared on reception)
if(osEventFlagsWait(*MXT_pstrTouchEvent, u32TOUCH_FLAG_MASK, osFlagsWaitAny,osWaitForever)== u32TOUCH_FLAG_MASK)
{
}
and this is Interrupt of GPIO
void HAL_GPIO_EXTI_Falling_Callback(uint16_t GPIO_Pin)
{
if (GPIO_Pin == Touch_INT_Pin)
{
osEventFlagsSet(*MXT_pstrTouchEvent, u32TOUCH_FLAG_MASK);
}
}
so, if you have any solution for this issue provide me with it please
thanks
2023-05-22 07:39 AM
Is your MXT_pstrTouchEvent really a pointer to the osEventFlagsId_t variable? "pstr" makes it look like a pointer to string (and geeze I hate Hungarian notation). And what is the value of u23TOUCH_FLAG_MASK?
And does your osEventFlagsWait() ever return, just not with the same value as whatever u23TOUCH_FLAG_MASK contains?