mirror of https://github.com/ARMmbed/mbed-os.git
Update the patch "Create HAL_PCD_EP_Abort" to fix bugs. This patch adds the low level functions USB_EPStopXfer, USB_EPSetNak, USB_EPClearNak and the high level function HAL_PCD_EP_Abort so that transfers can be stopped. The functions USB_EPSetNak and USB_EPClearNak allow nak to be enabled or disabled for an endpoint, preventing or allowing further transfers. The function USB_EPStopXfer stops pending reads and writes started by USB_EPStartXfer along with clearing and masking any interrupts enabled by USB_EPStartXfer. The function HAL_PCD_EP_Abort aborts any transfers on the given endpoint. When this function completes the transfer interrupt is guarenteed not to fire for this endpoint. Furthermore, the size of data transferred during an aborted read can be found by calling the function HAL_PCD_EP_GetRxCount. Other notes on this Change: 1. Prior to this patch the interrupt USB_OTG_DOEPINT_EPDISD was not handled. When an OUT endpoint was disabled this interrupt occurred causing the CPU to get stuck repeatedly handling this interrupt. This is because this interrupt was unmasked but nothing cleared this interrupt. This patch also adds code to handle and clear this interrupt to prevent a lockup. 2. Stopping a transfer on an OUT endpoint requires global nak OUT to be in effect. Even with this being done, having entries in the rx fifo prevented an OUT endpoint from being disabled. This behavior is not mentioned in the Reference Manual. |
||
---|---|---|
.. | ||
TARGET_ARM_FM | ||
TARGET_ARM_SSG | ||
TARGET_Analog_Devices | ||
TARGET_Atmel | ||
TARGET_Cypress | ||
TARGET_Freescale | ||
TARGET_GigaDevice | ||
TARGET_Maxim | ||
TARGET_NORDIC | ||
TARGET_NUVOTON | ||
TARGET_NXP | ||
TARGET_ONSEMI | ||
TARGET_RDA | ||
TARGET_RENESAS | ||
TARGET_Realtek | ||
TARGET_STM | ||
TARGET_Silicon_Labs | ||
TARGET_TOSHIBA | ||
TARGET_TT | ||
TARGET_WICED | ||
TARGET_WIZNET | ||
TARGET_ublox | ||
targets.json |