davids5 commented on pull request #3047: URL: https://github.com/apache/incubator-nuttx/pull/3047#issuecomment-797716774
> @davids5 Looks good to me, except I still think we need to protect for the case where the GPIO doesn't get configured for interrupt until after the interrupt fired. The current code would work fine in the case that you call eventwait right away, but a write followed by a long pause will result in a timeout rather than a WRCOMPLETE in that case. I agree with you that the timing should never really allow you to have this happen, but it's probably best to catch it anyway. @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 the Writcomplete logic takes the wait from 11-16+ mS down 9us 13 uS max.  ΔT 10.124115664 s Nfalling 5.376 k Nrising 5.377 k fmin 23.702 Hz fmax 1.25 kHz fmean 535.869 Hz Tstd 2.177 ms Hmin 790.406 µs Hmean 1.855 ms HSDev 2.174 ms Hmax 42.182 ms Lmin 8.969 µs Lmean 9.42 µs LSDev 281.8 ns **Lmax 13.625 µs** ---------------------------------------------------------------- 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