Commit Graph

138 Commits (279f4cd5841f747c57d5de7c310c77fbba346ad4)

Author SHA1 Message Date
Anna Bridge 07f1e068a9
Merge pull request #10689 from AGlass0fMilk/nrf52840-usbphy-implementation
nRF52840 USB Device Implementation
2019-06-18 16:28:20 +01:00
George Beckstein 9334b9e270 Removed mbed.h global include 2019-06-11 17:00:30 -04:00
George Beckstein af99f5ae1e Removed incorrect comment 2019-05-28 10:48:09 -04:00
aglass0fmilk 67cc3b0faf Added spdx identifiers and fixed indentation in targets.json 2019-05-28 10:48:09 -04:00
George Beckstein cd3d939b5d Astyle fixed USBPhy_Nordic.cpp 2019-05-28 10:48:09 -04:00
George Beckstein 002df471e0 Changed formatting, check if endpoint is stalled in unstall. Added errata header 2019-05-28 10:48:09 -04:00
aglass0fmilk 457691f392 Fixed failure on endpoint test data toggle reset (under Windows): "Data toggle not reset when calling ClearFeature(ENDPOINT_HALT) on an endpoint that has not been halted." 2019-05-28 10:48:09 -04:00
George Beckstein 57de05c54b Added in code to fix deepsleep underflow. Nullify event handler member variable. 2019-05-28 10:48:09 -04:00
George Beckstein cc4d8e6d75 Lock sleep when USB is initialized
Added logic to lock deep sleep when USB is initialized to prevent malfunctioning. This is consistent with the other drivers. See PR ARMmbed/mbed-os#9879
2019-05-28 10:48:09 -04:00
George Beckstein e006666527 Autoformatted with astyle 2019-05-28 10:48:09 -04:00
George Beckstein 911c799de0 Fixed some comments 2019-05-28 10:48:09 -04:00
George Beckstein 0fd7dcaa4e Fixed IRQ_ENABLE call to IRQ_DISABLE (oops). 2019-05-28 10:48:09 -04:00
George Beckstein 1ab27aff1f Finished compatibility changes for nrfx renaming 2019-05-28 10:48:09 -04:00
George Beckstein 2bd024d174 Fixing compatibilities with new nrfx drivers 2019-05-28 10:48:09 -04:00
George Beckstein 5d86c3b36f Removed redundant virtual status transfer notifications. 2019-05-28 10:48:09 -04:00
George Beckstein 40ee528479 Added workaround for "unloading" IN endpoints after unstalling. Disable and then reenable when USBPhyHw::endpoint_unhalt() is called. 2019-05-28 10:48:09 -04:00
George Beckstein 7e15a5b54a Removed unnecessary logic and changed round robin DMA scheduling 2019-05-28 10:48:09 -04:00
George Beckstein 8c176c34ef Added in flag for preventing double IRQ triggering and added asserts for Nordic driver calls 2019-05-28 10:48:09 -04:00
George Beckstein 9e61bbc4e3 Ignore events that happen when an endpoint is stalled/halted 2019-05-28 10:48:09 -04:00
George Beckstein 54b72d2eb3 Added a return from the virtual status transfer software-triggered interrupt. Not entirely sure this is appropriate. 2019-05-28 10:48:09 -04:00
George Beckstein cfea14ce6d Added simulated status stage interrupt 2019-05-28 10:48:09 -04:00
George Beckstein 171c8fa8e5 Trying virtual status stage and generated interrupt 2019-05-28 10:48:09 -04:00
George Beckstein 1babcd1011 Added setup status enum and removed some old commented out code 2019-05-28 10:48:09 -04:00
George Beckstein 94d01a99f3 Implemented USBPhyHw::unconfigure() as it was causing configuration changes to fail. Endpoints were not being removed properly in the Nordic driver 2019-05-28 10:48:09 -04:00
George Beckstein 4b744c86af Added data toggle clearing to removing endpoints. Reworked aborting endpoints in nordic driver to prevent an ASSERT when it is called on ISO endpoints 2019-05-28 10:48:09 -04:00
George Beckstein 859329fb2e Changed a little formatting 2019-05-28 10:48:09 -04:00
George Beckstein dde7bffb87 Added code to ignore ZLP packets on the ISOOUT endpoint... not fixing issue yet 2019-05-28 10:48:09 -04:00
George Beckstein d3844a181c Removed function call for SOF event -- frame counter is already included in data from usb event 2019-05-28 10:48:09 -04:00
George Beckstein 0320ebc1d8 Removed 0 max packet size assert for ISO endpoints. Ensured usbd_ep_abort would not be called on ISO endpoints (this currently causes an ASSERT in the Nordic driver 2019-05-28 10:48:09 -04:00
George Beckstein 608e326942 Fixed bug causing usb_control_stall_test to fail intermittently. Preparing the Nordic HW for the status stage of a control transfer would sometimes cause the HW to automatically ACK an "invalid" command during the control stall test. This would cause the test to fail (because an invalid request was not stalled). 2019-05-28 10:48:09 -04:00
George Beckstein c006888557 Reviewing functions. Added critical sections to some functions that access state information. 2019-05-28 10:48:09 -04:00
George Beckstein f00053820b Removed disable from disconnect to see if it affects the success of the soft reset test. 2019-05-28 10:48:09 -04:00
George Beckstein 09c5982a4b Added EP0 stalls to setup event handler 2019-05-28 10:48:09 -04:00
George Beckstein 4a735cb31e Added in triggers to synchronize control transfer stages with what the hardware expects. First working example! 2019-05-28 10:48:09 -04:00
George Beckstein bb65ee0ef6 Non-working custom feeder. Modified nordic driver to disable automatic EP0STATUS task triggering at end of DMA transfer 2019-05-28 10:48:09 -04:00
George Beckstein 16b3511fc1 working on making the mbed and nordic drivers compatible 2019-05-28 10:48:09 -04:00
George Beckstein 823067e015 Added errata fixes (171, 187) from nRF SDK 15.2 that would prevent USBD from starting up 2019-05-28 10:48:09 -04:00
George Beckstein ceb3a105ef Changed driver to request hf and lf clock sources... not sure why USB Ready event isn't ever getting triggered 2019-05-28 10:48:09 -04:00
George Beckstein faa80d9028 Changed power handler to enable/start & disable/stop USBD driver in background 2019-05-28 10:48:09 -04:00
George Beckstein bd2605cce9 Configured sdk for enabling USB. Preliminary implementation of USB for nRF52840 2019-05-28 10:48:09 -04:00
Kevin Bracey 2fbbd9d2ca Introduce Semaphore::acquire methods
Deprecate wait() in favour of acquire(), try_acquire(),
try_acquire_for() and try_acquire_until().

Brings Semaphore more into line with CMSIS-RTOS 2 (which uses "acquire"),
itself (as it has "release"), and other classes having "try", "try for"
and "try until".

Also steps away from vague "wait" term - the primary operation here is
to acquire the semaphore, and this will of course sleep.
2019-05-28 17:02:06 +03:00
Martin Kojtal d299b3fc8b
Merge pull request #9443 from juhaylinen/usbcdc_ecm
Add USBCDC_ECM class
2019-05-20 10:30:19 +01:00
Martin Kojtal 3ea1c56124
Merge pull request #10147 from kjbracey-arm/atomic_bitwise
Assembler atomics
2019-05-13 14:18:05 +01:00
Kevin Bracey 87396e0bf6 Assembler atomics
Reimplement atomic code in inline assembly. This can improve
optimisation, and avoids potential architectural problems with using
LDREX/STREX intrinsics.

API further extended:
* Bitwise operations (fetch_and/fetch_or/fetch_xor)
* fetch_add and fetch_sub (like incr/decr, but returning old value -
  aligning with C++11)
* compare_exchange_weak
* Explicit memory order specification
* Basic freestanding template overloads for C++

This gives our existing C implementation essentially all the functionality
needed by C++11.

An actual Atomic<T> template based upon these C functions could follow.
2019-04-26 13:12:35 +03:00
Russ Butler 3a891f9bfe Fix USB control transfers using small size
Fix support for wMaxPacketSize values other than 64 for endpoint 0.
2019-04-24 11:12:40 -05:00
Martin Kojtal 6b9d1573fb
Merge pull request #10096 from fkjagodzinski/test-usb-hid
Add USB HID tests
2019-04-17 14:06:51 +01:00
Filip Jagodzinski 565ceb0048 USBHID: Fix the initial HID report read operation
The first 4 bytes received were lost due to a wrong address.
Read the output report into HID_REPORT.data.
2019-04-09 17:03:21 +02:00
Russ Butler 2986b3af7c Fix doxygen comment in USBDevice
Update the doxygen to correctly describe the return value of
endpoint_read_result.
2019-04-08 17:30:22 -05:00
Martin Kojtal e7987a9f04
Merge pull request #10166 from cmonr/astyle-fix
Travis CI: Tweak astyle to not over-exclude files
2019-03-22 06:36:07 +01:00
Martin Kojtal f99431f7c2
Merge pull request #9444 from maciejbocianski/usb_msd_tests
Usb msd tests
2019-03-21 10:42:55 +01:00