After device has been initialized and started, the host resets it and it causes the GINTSTS.USBRST interrupt. In in its handler in CubeF4, among other things the following can be seen:
Okay, this is a conditional, so let's see where can we find USB_OTG_DOEPINT_OTEPSPR... for example here:
So let's have a look in the respective RM0390:
... and sure enough, bit 5 is said to be reserved in OTG_DOEPMSK's description (31.15.37 OTG device OUT endpoint common interrupt mask register)... or, more precisely, in the bits listing, it is MISSING...
Why am I not surprised?
But... wait... wasn't bit 5 of DOEPINT one of those mysterious bits in https://community.st.com/thread/31122#comment-158898 ? Oh. Looking into CubeL4's version of hal_pcd.c:
Humm, so that bit gets cleared *twice*... but maybe not, it's a conditional again so let's see the l4 headers... oh no one contains definition ofr USB_OTG_DOEPINT_OTEPSPR!
PS. Did I mention that RMW a register containing rc_w1 bits is WRONG WRONG WRONG!!! ?