Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event flags may not be reset [ESP32] #20

Open
xennex22 opened this issue May 2, 2022 · 0 comments
Open

Event flags may not be reset [ESP32] #20

xennex22 opened this issue May 2, 2022 · 0 comments
Assignees

Comments

@xennex22
Copy link

xennex22 commented May 2, 2022

Wifi_Wait uses osEventFlagsWait to wait for input. The flags are set in AT_Notify based on the received data.

The problem I have is that if there is a timeout in osEventFlagsWait and then the data arrives later, the event flags get set by AT_Notify. And then the next call to Wifi_Wait returns immediately because the flags are already set, but the data is not valid. Then all the send/receive gets out of sync and the only fix it to restart the driver.

The solution is to explicitly clear the event flags in CmdSend using osEventFlagsClear before the command the transmitted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants