Commit Graph

182 Commits (05fc0f526319523e87ae9467b1cbc361fb755416)

Author SHA1 Message Date
Martin Kojtal df84eb1b28
Merge pull request #10653 from desowin/stm-usb-host
STM USBHALHost: Fix NULL pointer dereference
2019-06-09 18:01:46 +01:00
Martin Kojtal 04d0b0d1c8
Merge pull request #10654 from desowin/usbhost-msd
USBHostMSD: Implement BlockDevice get_type()
2019-06-04 12:56:52 +01:00
Martin Kojtal 5d33fe1dfa
unsupported USBHAL: fix coding style 2019-06-03 08:44:41 +01:00
Tomasz Moń a39cba0e52 USBHost: Wait for device to implement SET ADDRESS
The USB Device must change the address within 2 ms after completing
SET ADDRESS status stage.

Wait 2 ms before issuing GET DESCRIPTOR under the new address. In my
case, this completely resolves the timeout issues.
2019-05-27 12:22:59 +02:00
Tomasz Moń 3116f329d7 USBHostMSD: Implement BlockDevice get_type()
This makes it possible to create instances of USBHostMSD class.
2019-05-24 12:40:30 +02:00
Tomasz Moń f5527eaf0e STM USBHALHost: Fix NULL pointer dereference
On STM32F746G Discovery boards, the USB OTG HS port does not have a
dedicated GPIO for controlling the USB VBUS.

This change fixes HardFault (NULL pointer dereference) that triggered
when such USB host port was used.
2019-05-24 11:56:23 +02:00
Jan Jongboom a5c6d423bc
tsi/main.cpp is using wrong `printf` format
`%` needs to be escaped as well.
2019-03-07 16:36:29 +01:00
Pharap b6aba2f985
Fix bug in templated attach function
The arguments passed to `Callback<void()>`'s constructor were the wrong way round,
thus preventing the `attach` function from being instantiated.
This patch corrects that by switching the order of the arguments.
2019-01-10 21:16:13 +00:00
Alastair D'Silva 2617c5d55b Don't use define checks on DEVICE_FOO macros (mbed code)
The DEVICE_FOO macros are always defined (either 0 or 1).

This patch replaces any instances of a define check on a DEVICE_FOO
macro with value test instead.

Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
2018-12-20 10:16:42 +11:00
Kevin Bracey 1ef213ec89 Clean up Thread deprecation warnings
Static Thread methods and signal methods have been deprecated. Remove
all references in the main code, and most of the tests. Some tests of
the deprecated APIs themselves remain.
2018-10-12 14:57:13 +03:00
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