mbed-os/targets
Russ Butler 86e1d436e7 Alternate implementation of HAL_PCD_EP_Abort
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.
2019-02-22 10:53:18 -06:00
..
TARGET_ARM_FM Add HAL API for spi pinmap 2019-02-08 09:10:37 -06:00
TARGET_ARM_SSG Add HAL API for spi pinmap 2019-02-08 09:10:37 -06:00
TARGET_Analog_Devices Add HAL API for spi pinmap 2019-02-08 09:10:37 -06:00
TARGET_Atmel Add HAL API for spi pinmap 2019-02-08 09:10:37 -06:00
TARGET_Cypress Merge pull request #9775 from vmedcy/psoc6-port-api 2019-02-20 12:02:26 -06:00
TARGET_Freescale Move USBPhy and related files to USB directory 2019-02-22 10:52:35 -06:00
TARGET_GigaDevice Add HAL API for spi pinmap 2019-02-08 09:10:37 -06:00
TARGET_Maxim Add HAL API for spi pinmap 2019-02-08 09:10:37 -06:00
TARGET_NORDIC Merge pull request #9767 from TacoGrandeTX/fix_nrf_swo_led2_clash 2019-02-21 11:01:46 -06:00
TARGET_NUVOTON Merge pull request #9656 from OpenNuvoton/nuvoton_m2351_fix-crypto-ac-mgmt 2019-02-11 18:46:48 -06:00
TARGET_NXP Move USBPhy and related files to USB directory 2019-02-22 10:52:35 -06:00
TARGET_ONSEMI Add HAL API for spi pinmap 2019-02-08 09:10:37 -06:00
TARGET_RDA Merge pull request #9501 from caixue1102/mbed-os-rda 2019-02-12 20:05:27 -06:00
TARGET_RENESAS Add HAL API for spi pinmap 2019-02-08 09:10:37 -06:00
TARGET_Realtek Add pinmaps to Ameba 2019-02-08 09:10:47 -06:00
TARGET_STM Alternate implementation of HAL_PCD_EP_Abort 2019-02-22 10:53:18 -06:00
TARGET_Silicon_Labs Add HAL API for spi pinmap 2019-02-08 09:10:37 -06:00
TARGET_TOSHIBA Add HAL API for spi pinmap 2019-02-08 09:10:37 -06:00
TARGET_TT Add HAL API for spi pinmap 2019-02-08 09:10:37 -06:00
TARGET_WICED New Wiced binaries 2019-02-21 16:59:11 +02:00
TARGET_WIZNET Add HAL API for spi pinmap 2019-02-08 09:10:37 -06:00
TARGET_ublox Add HAL API for serial pinmap 2019-02-08 09:10:28 -06:00
targets.json Update the STM32 USB driver to the new API 2019-02-22 10:53:16 -06:00