Skip to main content
rsoli.1
Associate II
May 22, 2023
Question

An issue with event flag

  • May 22, 2023
  • 1 reply
  • 838 views

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

This topic has been closed for replies.

1 reply

Bob S
Super User
May 22, 2023

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?