Commit Graph

172 Commits (e7cd6ae2a98d7b24cf30072eef07b66740aa85bc)

Author SHA1 Message Date
Aashish chaddha 1cdef09698 ifndef some macros to allow overriding during compilation or be able to get some warnings during redefinition 2018-08-08 15:23:19 -05:00
jeromecoutant 408209989e TARGET_STM USB astyle 2018-06-27 15:01:23 +02:00
Cruz Monrreal baf563709a
Merge pull request #7090 from jorisa/usbserial-write-nonblocking
Add non-blocking write function for USBCDC
2018-06-14 10:20:26 -05:00
Russ Butler 96d3667f20 Fix USB on Kinetis devices
Set correct SYSMPU register for proper USB operation.  This bug was
introduced when the SYSMPU register names and defines were updated
in the commit:
"K64F: Updated the SYSMPU SDK driver"
93f8cfed05
2018-06-08 10:56:09 -05:00
Joris Aerts 1fb57a3d38 Add non-blocking write function for USBCDC 2018-06-01 18:04:04 +02:00
Bartek Szatkowski a92ff94904 Fix rebase error 2018-05-25 12:20:10 -05:00
daid 62599a97f7 Add support for STEVAL-3DP001V1 board, which has an STM32F401VE chip. This support is based on the NUCLEO-F401RE board. Which has the same amount of flash/ram but less pins available on the chip. 2018-02-28 09:37:39 +01:00
Cruz Monrreal fe87499af8
Merge pull request #5874 from c1728p9/usb_fixes_and_improvements
USB fixes and improvements
2018-01-26 10:37:13 -06:00
bcostm 352ac7a2be Use RawSerial in MBED_11 test 2018-01-24 14:45:18 +01:00
Cruz Monrreal 5af1d8fca6
Merge pull request #5800 from abougouffa/feature_unsupported_usbhost
Some enhancements for the USBHost feature and small bug fix
2018-01-22 10:26:07 -06:00
Cruz Monrreal 6a708d1cf8
Merge pull request #5878 from c1728p9/lpc_usb_stability_fixes
LPC USB stability fixes
2018-01-22 10:25:13 -06:00
Russ Butler 6fe0aa0074 Fix LPC17XX and LPC40XX USB data throttling
Only clear the USB read buffer when endpointRead is called. This
allows data to be read with endpointReadResult without also allowing
USB to transfer more data. Instead additional data is transferred explicitly
with a call to endpointRead.
2018-01-17 21:50:20 -06:00
Russ Butler eda332cbf8 Fix LPC17XX and LPC40XX USB race condition
If a SETUP packet arrives shortly after an IN then the packets will be
processed in the wrong order - SETUP first then IN. This causes
the subsequent control transfer to fail. Fix this problem by processing
IN packets before processing SETUP packets.
2018-01-17 21:50:18 -06:00
Russ Butler 352ff8df14 Kinetis USB improvements and fixes
Make the following improvements and fixes:

1.
Update the Kinetis USB driver so that endpointReadResult only reads the
result of the last read and does not trigger a new read. Instead
move the code to trigger new reads into endpointRead.

2.
Fix the race condition in controlIn caused by a call to
EP0read() followed immediately by  EP0readStage(). This is done by
setting up to read the next setup packet (ignoring the status stage)
in endpointReadResult rather than in EP0readStage. This makes the
function EP0readStage unnecissary.

3.
Remove the Kinetis workaround in controlOut in USBDevice.cpp since
point 2 fixes this bug. For more info on this see the PR which
added this workaround - https://github.com/ARMmbed/mbed-os/pull/414
2018-01-17 20:58:16 -06:00
Russ Butler beaac1525e Fix clearing of ISTAT in Kinetis USB
The ISTAT register is write 1 to clear. Because of this ORing this
register with itself fill clear all bits that are set. This patch
updates the code to use plain assignment so only desired
bit is cleared.
2018-01-17 20:54:08 -06:00
Russ Butler 48cf4d85d1 Remove use of deprecated attach in USB
Attach callbacks with the assignment operator rather than with the
deprecated attach function. This fixes deprecation warnings.

This patch also adds the ability to attach a Callback directly.
2018-01-17 20:54:05 -06:00
Russ Butler 6decbedbb8 Fix local static initialization in USB
The local static initialization in USB was causing multiple problems:
-Configurable descriptor values are set only once
-USB descriptor initialization causes a trap in debug builds since
 this is acquiring a mutex in an interrupt handler
-Extra ram used since all descriptors  are in RAM

This patch fixes these problems by making fixed descriptors
static const so they are stored in flash and never need to be
initialized and by making descriptors that do change a member
of the class so they are always initialized when requested
rather than once though lazy static local initialization.
2018-01-17 20:53:57 -06:00
Adam Heinrich da81229186 NUCLEO_F413ZH: Add support for the NUCLEO-F413ZH board
Merged from the existing TARGET_DISCO_F413ZH code (which has the same MCU)
and TARGET_NUCLEO_F412ZG code (which has the same Nucleo-144 board and
pinout).
2017-12-29 15:30:10 +01:00
Anna Bridge a4d1dee25e
Merge pull request #5617 from bcostm/usbhost_clean-up
STM32: USBHost clean-up
2017-12-29 10:48:03 +00:00
Martin Kojtal 02beec7ee3
Merge pull request #5567 from bcostm/dev_usbdevice_disco-f413zh
STM32: Add USB Device on DISCO_F413ZH
2017-12-12 17:32:03 +00:00
Abdelhak Bougouffa 4bba4e59fc Add checking for MAX_HUB_NB in a part of code that depend on MAX_HUB_NB 2017-12-02 17:09:46 +01:00
Abdelhak Bougouffa fd06eb2534 Replace the old deprecated callbacks 2017-12-02 17:08:43 +01:00
Steven Cooreman 5dd46136ad Remove usage from USB driver as well 2017-12-01 12:13:06 +01:00
Martin Kojtal 221b8a84b1
Merge pull request #5580 from bcostm/dev_usb_speed_disco-f746ng
DISCO_F746NG: add usp_speed configuration
2017-11-30 18:09:47 +00:00
bcostm c621c688c4 STM32 USBHOST: Remove DISCO_F429ZI
Impossible to make USBHost working on this board.
Remove it for now until a fix is found.
2017-11-30 13:59:43 +01:00
bcostm fe507af862 STM32 USBHOST: Corrections for DISCO_F746NG 2017-11-30 13:52:10 +01:00
bcostm 22a4299368 STM32 USBHOST: Corrections for DISCO_F429ZI 2017-11-29 18:54:04 +01:00
bcostm 18a6b96242 STM32 USBHOST: Add support of DISCO_F469NI and DISCO_F769NI 2017-11-29 18:54:04 +01:00
bcostm 8416afaeb1 STM32 USBHOST: Add support of DISCO_F413ZH 2017-11-29 18:54:04 +01:00
bcostm 755865d3fc STM32 USBHost: Improvements in USBHALHost_STM.h 2017-11-29 18:54:04 +01:00
bcostm 377db59371 STM32 USBHost: Remove USBHALHost_STM_TARGET.h files
These files are replaced by the USBHALHost_STM.h file common to all boards.
2017-11-29 18:54:04 +01:00
bcostm ef46d08589 STM32 USBHost: rename files
The USBHALHost_STM_144_64pins.h has been renamed in USBHALHost_STM.h

All the configuration is done in this file now for Nucleo and Disco boards
2017-11-29 18:54:03 +01:00
Steven Cooreman 2becfbe2e4 Convert USB library from em_int to em_core 2017-11-25 13:03:40 +01:00
bcostm b1073c165f DISCO_F746NG: add usp_speed config 2017-11-24 16:52:59 +01:00
bcostm ada482a4c3 STM32: Add USB Device on DISCO_F413ZH 2017-11-23 11:11:58 +01:00
bcostm dc9eab795e STM32 USBDevice: Add DISCO_F429ZI 2017-11-17 13:10:52 +01:00
Bartek Szatkowski 6e11dc2c4a Modification to arm_math.h
Remove redefinition of __CLZ and __SSAT.
2017-11-10 09:53:42 +00:00
bcostm 8f4b6e241d STM32 USBDevice: Add DISCO_F407VG target 2017-09-05 14:08:52 +02:00
bcostm 9e3b509a99 STM32 USBDevice: Add NUCLEO_F446RE target 2017-09-05 14:08:52 +02:00
bcostm 1d72b3124d STM32 USBDevice: Remove disco-f429zi, clean-up nucleo-f103rb 2017-09-05 13:24:32 +02:00
bcostm 211d2011eb STM32 USBDevice: add more supported targets 2017-09-05 13:24:32 +02:00
bcostm 58c9f4b9bd STM32 USBDevice: refactor files 2017-09-05 13:24:32 +02:00
ccli8 d22d086a87 [M487] Add SPI pins for test code 2017-08-22 11:00:29 +08:00
ccli8 478a1b62ea [NUC472/M453] Support USB device/host for chip series
With this fix, USB support is not limited to one target.
2017-08-22 09:30:23 +08:00
ccli8 cacc444b73 [M487] Support USB device/host 2017-08-22 09:27:31 +08:00
bcostm 6b721d345a DISCO_L475VG_IOT01A: Add support of USBHost 2017-08-04 13:19:13 +02:00
jeromecoutant bdd4f18acb ST USB config files 2017-07-11 16:29:44 +02:00
Mihail Stoyanov 717150cdf2 Reorganize vendor specific code into targets folders, following the mbed-os/targets/ design pattern 2017-06-27 14:20:36 -05:00
Jimmy Brisson 453d9ee96c Deduplicate USBHAL_STM_TARGET.h 2017-06-26 14:55:29 -05:00
Jimmy Brisson d103979e92 Merge pull request #4572 from bcostm/add_usb_disco_l072cz
DISCO_L072CZ_LRWAN1: Add support of USB Device
2017-06-26 10:28:31 -05:00