usb: nordic: Clear STALL when Endpoint is enabled.

Endpoint STALL should be cleared when Endpoint is enabled.
In particular when the HOST performs SetInterface requests
and Endpoints associated with that Interface are enabled
STALL should be cleared.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
This commit is contained in:
Emil Obalski 2020-11-05 14:41:24 +01:00 committed by Maureen Helm
commit 1ebe1573da

View file

@ -1616,6 +1616,10 @@ int usb_dc_ep_enable(const uint8_t ep)
* toggle sequencing and should only send DATA0 PID.
*/
nrfx_usbd_ep_dtoggle_clear(ep_addr_to_nrfx(ep));
/** Endpoint is enabled on SetInterface request.
* This should also clear EP's halt status.
*/
nrfx_usbd_ep_stall_clear(ep_addr_to_nrfx(ep));
}
if (ep_ctx->cfg.en) {
return -EALREADY;