embassy-rs / embassy

Modern embedded framework, using Rust and async.
https://embassy.dev
Apache License 2.0
5.64k stars 781 forks source link

otg: fix corruption in CONTROL OUT transfers in stm32f4. #3565

Closed Dirbaio closed 2 days ago

Dirbaio commented 3 days ago

The RM says we have to process STUP (and therefore clear CNAK to start the data stage) in the DOEPINT STUP interrupt. Seems doing it in RXFLVL when we receive the data is too early. This makes it work consistently on all chips, so the quirk is no longer needed.

Fixes #3493 Fixes #3459

bugadani commented 3 days ago

Nice! The embassy-usb-synopsys-otg changes are breaking and the API break isn't necessary for the fix (the parameter/field could still be present but ignored for compatibility), so I'd appreciate this be released as a major update.

elagil commented 3 days ago

Works great in my testing.

vDorst commented 3 days ago

I don´t see the problems anymore as reported in https://github.com/embassy-rs/embassy/pull/3212#issuecomment-2433589643. So works for me.

votrungchi commented 1 day ago

Great works. 🚀