Fred Sundvik
b7f761313c
Fix data usb data toggle sync problem
...
USB control transfers are structured as the following.
For incoming transfers
Setup (Data0 out)
Data (Data1/Data0 in) - starting with data 1
Status (Data1 out)
For outgoing transfers
Setup (Data0 out)
Data (Data1/Data0 out) - starting with data 1
Status (Data1 in)
The in buffers (device to host) are always correctly synchronized, since
they can always be reset to Data1 each setup packet without any
synchronization problems.
The problem occured for outgoing transfers (host to device). For
incoming transfers the data banks always alternates, and will
automatically stay in sync. Outgoing transfers also stays in sync when
there's an odd number of data packets. However when the number is even,
including zero, then the last packet received by the device will be
data0 and the next setup packet also has to be data0, so there's a
synchronization problem.
This itself is not a problem since data toggle synchronization(DTS) is
ignored for setup packets, however if the follwoing packet after that
is also an out packet, then the data bank will be wrong and the packet
dropped. In this case the USB spec don't allow sending a nack, so it
will only recover after a timeout, when the host tries to send a new
setup packet.
The old code tried to take care of this situation by reinitializing
both data banks when a setup packet is received. The problem is that the
next packet might already have been received or is in progress of being
received at this point, so the fixup comes to late. The new code does
the fixup when a status packet is about to be sent from the device to
avoid this problem.
2018-02-08 08:34:51 +02:00
Fred Sundvik
432bc1762f
Add usb_lld_wakeup_host for Kinetis
2018-02-03 17:25:31 +02:00
Adrian
90b7d6bbd0
Added support for STM32F7
...
Tested only for STM32F746, other chipsets have to be checked.
2018-01-31 09:55:38 +01:00
Wim Lewis
7e51a3bcfa
Use an interrupt instead of polling for simple commands.
...
Updated some comments and some trace statements.
2018-01-18 18:23:07 -08:00
Wim Lewis
48d924c24b
Improved error handling: check the card's state before trying to abort
...
a failed data transfer; translate card status bits into HLD error
bits. Set BLKATTR_BLKCNT even when it's not being used, which seems to
avoid errors when alternating between multi-block and single-block
transfers. Some comments.
2018-01-18 01:33:04 -08:00
Wim Lewis
ee3f7f1b85
Low-level driver for the Kinetis SDHC peripheral as found on the MK64FX512
...
and other members of the Kinetis family.
2018-01-06 03:17:53 -08:00
Wim Lewis
527ddd6e45
Board definitions for the PJRC Teensy 3.5, based on the Kinetis K64.
2018-01-06 03:14:43 -08:00
Wim Lewis
0df335ce45
Basic support for the (Motorola/Freescale/NXP) Kinetis MK64FX512 chip,
...
partially copied from the existing K20 support.
2018-01-06 03:09:58 -08:00
Dave Flogeras
5cc37ffd32
Add STM32F769 to FSMCv1 sdram driver
2017-12-14 16:25:15 -04:00
Wim Lewis
c4eb6b4901
Added support for additional UARTs (up to six on the K64F).
...
Also moved some code that is duplicated per-UART into
local functions to reduce the amount of duplication.
2017-12-08 19:42:13 -08:00
marcoveeneman
19efef2f4a
Fixed hal_i2c_lld.c
2017-11-24 22:25:12 +01:00
marcoveeneman
ec4b244c51
Merge pull request #125 from marcoveeneman/tiva_add_uart
...
Add Tiva UART driver.
2017-11-23 21:37:24 +01:00
Fabio Utzig
ab3f7c22cc
Merge pull request #133 from belak/k20x-mcg-c2
...
Fix for K20x startup
2017-11-04 17:32:26 -02:00
Kaleb Elwert
96413f3767
Fix for K20x startup
2017-11-04 10:41:06 -07:00
Kimmo Lindholm
39487df4de
SCSI: Respond to unit serial number inquiry
2017-10-12 00:06:50 +03:00
marcoveeneman
1cc2988040
Aligned the Tiva port to the SPI driver improvements.
2017-09-10 21:16:14 +02:00
marcoveeneman
5d77abe7f2
Initial version of the Tiva UART driver.
2017-09-10 19:43:04 +02:00
Fabien Poussin
bec3eada37
Merge branch 'master' into usbh_devel
2017-08-08 17:29:28 +02:00
marcoveeneman
e04751c836
Merge pull request #120 from marcoveeneman/tiva_add_adc
...
Tiva add ADC driver
2017-08-08 16:23:00 +02:00
Diego Ismirlian
84f28dd0b1
USBH: FTDI: correct bugs
2017-08-07 17:52:51 -03:00
Diego Ismirlian
21f95b50f4
USBH: simplify/cleanup main driver
2017-08-07 17:51:34 -03:00
Diego Ismirlian
6a9d91cb1a
USBH: STM32 LLD: break LS activity detect loop if port is disabled
2017-08-07 17:47:52 -03:00
Diego Ismirlian
02585210d1
USBH: STM32 LLD: various improvements
...
- general cleanup
- implemented workaround to undocumented erratum (the OTG core may
report successful enabling of port when connecting a low-speed device,
but really it generates no traffic and remains in a "dumb" state)
- improved handling of disconnection of devices (avoid submitting URBs
if the port is disabled)
2017-07-31 18:48:23 -03:00
Diego Ismirlian
ca1882c01b
USBH: improved debug output
2017-07-31 18:46:22 -03:00
Diego Ismirlian
2fb4cf9273
USBH: improved main driver
...
- improved connection/disconnection handling
- corrected bug on aborting non-pending URB
- corrected bug on disconnecting multiple hubs
- improved debug messages
2017-07-31 18:38:46 -03:00
Diego Ismirlian
91fd21695b
USBH: replaced some ch* functions with OSAL equivalents
2017-07-16 20:08:02 -03:00
Diego Ismirlian
dee22cee18
USBH: remove unnecessary reschedules and add necessary ones
2017-07-16 20:01:50 -03:00
Diego Ismirlian
ce8f18291f
USBH: Use infinite timeout for control request, when timeouts are not specified
2017-07-16 18:40:09 -03:00
Diego Ismirlian
7bf4908f23
USBH: HID: Implement synchronization
2017-07-16 18:38:59 -03:00
Diego Ismirlian
d395dde065
USBH: HUB: don't clear status flags on NAK
2017-07-16 18:34:19 -03:00
Diego Ismirlian
54c53d4e22
USBH: MSD: improved syncrhonization
2017-07-16 18:32:23 -03:00
Diego Ismirlian
b294a6cff6
USBH: Use configured UART for debug; avoid garbage debug output
2017-07-16 18:30:13 -03:00
Diego Ismirlian
4026bc900d
USBH: Correct bug in LLD
2017-07-16 18:19:06 -03:00
Diego Ismirlian
b916519dd6
USBH: Added TODO list
2017-07-14 12:15:19 -03:00
Diego Ismirlian
3d6f481ba8
USBH: MSD: replace mutex with semaphores (more lightweight)
2017-07-14 12:14:59 -03:00
Diego Ismirlian
0f269d99fd
USBH: HID: corrected interrupt IN request length
2017-07-14 11:01:44 -03:00
Diego Ismirlian
c044306ad0
USBH: Add flexibility to the enumeration process
2017-07-13 16:45:31 -03:00
Diego Ismirlian
c9cc2abf3e
USBH: cleanup
2017-07-13 12:57:06 -03:00
Diego Ismirlian
442b723c12
USBH: Cleaned up list.h
2017-07-09 19:49:56 -03:00
Diego Ismirlian
65966b4cd4
USBH: fixed list.h; should now compile with C++
2017-07-09 19:45:57 -03:00
Diego Ismirlian
6b7161b90a
USBH: moved usbh/desciter.h and usbh/debug.h to usbh/internal.h
2017-07-09 19:42:36 -03:00
Diego Ismirlian
665643c9e4
USBH: list.h reduced to compile only the functions in use
2017-07-09 19:40:44 -03:00
Diego Ismirlian
025ca5345a
USBH: Added mechanism for out-of-tree class driver enumeration
2017-07-09 18:30:46 -03:00
Diego Ismirlian
c938866844
USBH: moved definition of driver to LLD
2017-07-09 18:29:44 -03:00
Diego Ismirlian
c900c951a3
USBH: MSD: Rework to prevent race conditions on unload
2017-07-04 19:09:39 -03:00
marcoveeneman
801b264b75
Fixed ADC driver.mk
2017-07-03 23:03:37 +02:00
marcoveeneman
f8b656a810
Added missing driver.mk file for the ADC driver.
2017-07-03 22:30:46 +02:00
marcoveeneman
884dbaeabc
Improved ADC driver and ADC testhal application.
2017-07-03 22:24:07 +02:00
marcoveeneman
ffd9d3fd90
Initial ADC driver and testhal application for TM4C123x.
2017-07-03 22:23:55 +02:00
Diego Ismirlian
d2c155b4cf
USBH: moved declaration of driver to LLD
2017-06-09 11:07:20 -03:00
Diego Ismirlian
4483baab02
USBH: UVC, fix compile with IAR
2017-06-08 12:38:14 -03:00
Diego Ismirlian
78da479955
USBH: STM32 lld, activate correction of unexpected length
2017-06-08 12:37:24 -03:00
Diego Ismirlian
b9f0fc24c5
USBH: fix Mass Storage Driver EP reset status bug
2017-06-08 12:36:30 -03:00
Diego Ismirlian
5a876ba2b0
USBH: License change for UVC driver
2017-06-06 15:25:05 -03:00
Diego Ismirlian
50dda7cff2
Add UVC driver and test/example
2017-06-06 15:21:37 -03:00
Diego Ismirlian
e2f7c9277c
mend
2017-06-06 10:24:39 -03:00
Diego Ismirlian
9349f74004
Clean up request type helpers
2017-06-06 10:21:00 -03:00
Diego Ismirlian
1bb8f56c3b
HID class driver fixes
2017-06-06 09:24:10 -03:00
Diego Ismirlian
108ae2534c
Fixed endpoint halt reset implementation
2017-06-06 09:23:07 -03:00
Diego Ismirlian
0bf5a7aa4c
Fixed bugs in new MSD driver implementation
2017-06-06 09:21:10 -03:00
Diego Ismirlian
61c3a28398
Mass license dates update
2017-06-05 11:04:30 -03:00
Diego Ismirlian
5bc62c93e0
Add HID class driver
2017-06-05 10:53:59 -03:00
Diego Ismirlian
0260fd851a
Added PID for FTDI-enabled ETT USB-Serial
2017-06-05 10:45:23 -03:00
Diego Ismirlian
b58a299521
Rework Mass Storage Driver
...
- Implemented (hopefully) correct Mass Storage Reset Recovery protocol
- Implemented auto-sense protocol for SCSI command failure
2017-06-05 10:41:42 -03:00
Diego Ismirlian
835bb887c0
Add AOA (Android Accessory) class driver
2017-06-05 10:38:05 -03:00
Diego Ismirlian
a77ab485fb
Remove redundant hal_stm32_otg.h file
...
The correct version is already present in ChibiOS
2017-06-05 10:27:20 -03:00
Diego Ismirlian
cc347f02ba
Fix possible race condition in FTDI driver stop
2017-06-05 10:26:17 -03:00
Diego Ismirlian
5ecaf7722b
USB Host fixes
...
- Cleaned up alignment macros for GCC & IAR
- Corrected EP halt and Clear halt behaviours
- Initialization of class drivers by USB Host main driver
- Minor cosmetic fixes
- Updated USB_HOST testhal app
2017-06-05 10:18:45 -03:00
Andres Vahter
c5be9cd85b
Add checks to QEI if STM32 TIM is already used
2017-06-05 09:25:37 +03:00
marcoveeneman
2841fd88cd
Updated license headers
2017-04-20 19:47:50 +02:00
marcoveeneman
cfbd190b1e
Fixed Tiva low level driver @file documentation.
2017-04-18 23:17:00 +02:00
marcoveeneman
3e3db4cf24
Improved documentation of the Tiva serial driver.
2017-04-18 23:06:30 +02:00
marcoveeneman
e712f914ba
Implemented advanced buffering support for the Tiva serial driver.
2017-04-18 22:55:01 +02:00
marcoveeneman
01423b08c2
Changed the flag set when a serial buffer is full.
2017-04-18 22:41:25 +02:00
marcoveeneman
9617145f21
Added driver.mk file for each low level peripheral driver.
2017-04-18 22:20:21 +02:00
Romain Reignier
15517ffbd0
[DMA2D, LTDC] Removing ch.h dependencies. Fix #111 .
2017-02-28 22:59:28 +01:00
Fabien Poussin
4ffde4b17e
[Comp] Adding interrupt functions, updating example.
2017-02-09 12:30:21 +01:00
Fabien Poussin
fd89254b0d
[Comp] Adding support for STM32F0.
2017-02-07 16:08:08 +01:00
Fabien Poussin
8b7e318d78
[Comp] Adding more defines
2017-02-07 15:46:43 +01:00
Fabien Poussin
1d10f06ab4
[Comp] Adding init, helper defines.
2017-02-07 15:37:20 +01:00
Fabien Poussin
f4687bd298
[Comp] Cleaning example, removing dependencies and adding checks.
2017-02-07 15:20:28 +01:00
Fabien Poussin
7059c87ab4
[COMP] Fixing headers, missing includes.
2017-02-07 10:58:11 +01:00
Fabien Poussin
86428716d5
Adding COMP Driver.
2017-02-06 20:09:28 +01:00
Fabien Poussin
11e949d81b
[Timcap/Eeprom] Removing ch.h dependencies.
2017-02-06 13:32:36 +01:00
barthess
c09968f967
[STM32, NAND] Fixed #elif without expression
2017-01-24 12:15:04 +03:00
Uladzimir Pylinski
8338d28cc0
Merge pull request #110 from ObKo/usb_hid-improve
...
usb_hid: cosmetic improvements in report descriptor defines.
2017-01-22 23:39:38 +03:00
barthess
88c55f1aaa
FSMC NAND improvements.
...
1) Implemented 16 bit bus width support
2) Added workaround errata in STM32
2017-01-17 21:10:54 +03:00
Konstantin Oblaukhov
c8a9cbd995
usb_hid: HID_REPORT_ID macro.
2017-01-17 16:39:08 +07:00
Konstantin Oblaukhov
9370dc02c7
usb_hid: cosmetic improvements in report descriptor defines.
2017-01-17 11:37:32 +07:00
barthess
3e8fdd762a
Merge branch 'master' of github.com:ChibiOS/ChibiOS-Contrib
2017-01-06 11:06:52 +03:00
barthess
779ea88be7
NAND. Added reset function.
2017-01-06 11:06:40 +03:00
Fabien Poussin
0135ff7dd3
Merge pull request #107 from pl4nkton/stm32_fixes
...
Stm32 fixes
2017-01-04 10:47:39 +01:00
barthess
52f82fb9cc
USB MSD. Cosmetical improvements.
2017-01-04 10:17:04 +03:00
barthess
9b1c3b0122
USB_MSD. Added compile time check about sychronous API.
2017-01-03 10:26:44 +03:00
Fabio Utzig
453a05641e
Merge pull request #108 from funnydog/hal-fixes
...
hal: fix the compilation of hal_usb_hid.c
2016-12-17 10:48:41 -02:00
funnydog
328f64069d
hal: fix the compilation of hal_usb_hid.c
...
Fix the compilation of hal_usb_hid.c that broke because of the changes
in ibqObjectInit() and obqObjectInit() prototypes.
In hidObjectInit() call these functions with the additional suspend
parameter set to true as done in ChibiOS-RT.
2016-12-13 12:35:58 +01:00
barthess
2b9cfccc76
Merge branch 'master' of github.com:ChibiOS/ChibiOS-Contrib
2016-12-09 18:04:38 +03:00
barthess
53d3fd07f3
FSMC. Sync mode improvements.
...
1) Control registers writes reordered in init sequence to eliminate
incorrect output clock frequnency in short period after CCLKEN bit
set and B(W)TR registers set.
2) Added reset of CCLEN bit in stop procedure.
2016-12-09 18:00:28 +03:00
Nicolas Reinecke
546ac1d584
STM32: fix USB HOST HS when cpu is in sleep mode
2016-12-05 11:47:32 +01:00
Peter
c7d33767e0
change qei types to int16_t
2016-12-05 11:37:44 +01:00