antmerlino commented on pull request #3047: URL: https://github.com/apache/incubator-nuttx/pull/3047#issuecomment-799030922
> @antmerlino this code here handle the late case. I do need to put this on top of your PR and test again. If we bring this in first the I can retest your PR rebased or visa-versa. > > https://github.com/apache/incubator-nuttx/blob/cf9241b28d7f93584e830d87892c13b81a38f028/arch/arm/src/stm32f7/stm32_sdmmc.c#L2843 I agree that this takes care of the case when you perform another operation right after a write, but what happens when you write and then don't come back in to call eventwait for a long time? If you got the interrupt enabled in time, you're covered. But if you didn't get the interrupt enabled in time and you don't perform another operation soon after writing, you won't call eventwait to check the pin and therefore will timeout, despite the write being complete. So I do think we need additional logic inside WAITENABLE to catch this case. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org