Jerzy Kasenberg
642a8b00c8
synopsys: Fix odd/even frame handling for ISO
...
Current implementation always sets odd/even bit for ISO transactions.
This is a good strategy only if interval is 1.
For ISO endpoint interval in (micro)frames is computed as
2^(interval-1), which means that odd/frame number should stay
same for interval values > 1.
With this change only when interval is 1 odd/even bit is modified.
2020-09-28 08:41:17 +02:00
Jerzy Kasenberg
6b52330969
synopsys: Remove compilation warning in dcd_edpt_close
...
dcd_edpt_close() no longer modifies FIFO distribution.
Code that that was commented out is removed along with
variables that are no longer used.
FIFO distribution among endpoints is handled upfront
and does not need to be modified in open and close endpoint
functions.
2020-09-28 08:41:17 +02:00
Jerzy Kasenberg
6f3d0af1e6
synopsys: Fix fifo allocation schema
...
Recommended FIFO allocation schema includes 2 maximum endpoint sizes.
Comment suggested that this is the case while it would work according
to this description only in checked endpoints were ascending sizes.
Also two same size endpoints would be counted as one.
That is fixed by way sz is filled.
Calculation used too much modulo operation while single division was enough
to account for odd FIFO sizes.
Extra space that is evenly distributed between Bulk and control endpoints
was incorrectly calculated it could prevent allocation of ISO endpoint FIFO
when bulk endpoints existed with smaller endpoint numbers.
Minimum endpoint FIFO size is 16 32bit words, FIFO space requirement is
now observed.
2020-09-28 08:41:17 +02:00
Jerzy Kasenberg
62a76c0e04
nrf52: Fix edpt_dma_start() wrong condition check
...
Operator < used in while condition was obviously incorrect.
Loop starts with checking if unsigned variable is less then 0.
This condition is always false.
This reverses condition to follow intention of of the code.
2020-09-15 16:08:23 +02:00
Reinhard Panhuber
4e789b240d
Start of sampling works.
2020-09-06 11:37:59 +02:00
Reinhard Panhuber
12562fc966
Merge remote-tracking branch 'upstream/master' into uac2
2020-09-04 16:23:39 +02:00
Ha Thach
19f08a02f6
Merge pull request #486 from kasjer/kasjer/add-endpoint-close-to-synopsys
...
Add dcd_edpt_close() to synopsys
2020-08-24 13:10:46 +07:00
hathach
9d3a9cf546
add OPT_MCU_SAMD11
...
skip ci build for example that need more ROM/RAM could fit into SAMD11
2020-08-22 18:46:19 +07:00
Reinhard Panhuber
37be0ca732
Fix formatting, get rid of all tabs.
2020-08-20 20:09:44 +02:00
Reinhard Panhuber
c14f68e2c1
Commit before sharing.
...
Setup a test example - UNTESTED!
Missing: Start transmitting audio data in set_interface.
2020-08-19 21:07:43 +02:00
Reinhard Panhuber
6309364722
Merge remote-tracking branch 'upstream/master' into uac2
...
Conflicts:
src/device/usbd.c
src/device/usbd.h
src/portable/st/synopsys/dcd_synopsys.c
2020-08-16 14:08:24 +02:00
Reinhard Panhuber
444e4d2821
Add EP close. Fix bug in set_interface within audio.
2020-08-16 13:48:25 +02:00
Jerzy Kasenberg
e8d50a3c57
Add dcd_edpt_close() to synopsys
...
Endpoint close was implemented only in one driver so far.
This function is needed for interfaces with several alternate settings.
The way FIFO is allocated in dcd_edpt_open() allows to correctly close
only one IN endpoint (the one that was opened last).
2020-08-14 14:29:35 +02:00
Jerzy Kasenberg
88c5e2a37f
Fix synopsys fifo flush during stall
...
Wrong FIFO was flushed in dcd_edpt_stall().
(epnum - 1) should only be used when accessing DIEPTXF registers.
For DIEPCTL and GRSTCTL epnum is correct index.
2020-08-12 10:26:36 +02:00
Ha Thach
6f3378f71d
Merge pull request #476 from kasjer/kasjer/fix-synopsys-fix-iso-frame-bit
...
Fix synopsys odd/even frame bit for IN ISO endpoints
2020-08-05 22:36:05 +07:00
Jerzy Kasenberg
e9aa36a6e8
Fix synopsys odd/even frame bit for IN ISO endpoints
...
For ISO endpoint driver has to specify when data
is to be transmitted (odd or even frame).
Currently code was not updating this bit resulting in
data being sent every other frame.
If interval was 1ms full data packed was sent every 2ms, and
ZLP was sent in between.
2020-08-04 09:32:41 +02:00
hathach
7d9efd0697
manually submit unplugged event for nrf dcd_disconnect()
2020-08-04 14:18:12 +07:00
Ha Thach
026a1e7ac8
Merge pull request #478 from hathach/move-dcdconnect-to-dcdinit
...
Move pull-up enabling to dcd_init() instead of usbd
2020-08-04 14:11:32 +07:00
Reinhard Panhuber
c557bf7b2e
Implement dynamic FIFO RAM allocation according to configuration desc.
2020-08-03 19:48:05 +02:00
Ha Thach
72464faca4
Merge pull request #472 from hathach/fix-msp430-warning
...
fix msp430 gcc 9.2.0 warning
2020-08-02 12:53:03 +07:00
hathach
acde49ccc9
enable pull-up in dcd_init() instead of usbd
2020-08-01 20:14:58 +07:00
Ha Thach
310797a580
Merge pull request #477 from hathach/fix-nrf-unplugg-isr-event
...
correct isr context for nrf DCD_EVENT_UNPLUGGED
2020-08-01 12:31:48 +07:00
hathach
9bf2b33366
correct isr context for nrf DCD_EVENT_UNPLUGGED
...
also rename debug lookup to prevent conflict
2020-08-01 12:02:59 +07:00
Jerzy Kasenberg
c3b0389f10
Fix synopsys size check for ISO endpoint
...
Constraint was incorrect for ISO endpoint as stated in TODO.
2020-07-31 15:52:21 +02:00
hathach
10a8ef7614
fix nested extern declaration of 'SystemCoreClock' [-Werror=nested-externs]
2020-07-29 17:04:47 +07:00
hathach
5af08e2ffc
fix strict prototype
2020-07-29 16:59:07 +07:00
Ha Thach
8dda0a0dd1
Merge pull request #454 from me-no-dev/esp32-s2-fifos
...
ESP32-S2: Handle the fact that available EP IN FIFOs are less than the number of available EP INs
2020-07-28 15:16:15 +07:00
me-no-dev
a1a390a788
Update dcd_esp32s2.c
2020-07-28 10:54:23 +03:00
hathach
6976e64217
fix msp430 gcc 9.2.0 warning in #465
2020-07-28 14:36:15 +07:00
Reinhard Panhuber
01903a4a6d
Implement dynamic reallocation of RX and TX fifos for EP0.
...
Tested with EP0 size 8/16/32/64.
2020-07-27 21:03:20 +02:00
Reinhard Panhuber
5e3f90cd6e
add 'set_EP0_max_pkt_size(...)' and fix EP0 size to 64 bytes after reset
2020-07-26 19:21:30 +02:00
hathach
0407cfe16c
fix samd21 race condition with setup packet
...
reproduced with Adafruit_TinyUSB_ArduinoCore port commit 11d669b4d2a40eb2fc5e51b2a9707a6de9d42363 and SAMD BSP 1.6.1
2020-07-23 01:39:15 +07:00
hathach
7baeea7a00
update actual link speed for spresense
2020-07-17 18:28:19 +07:00
hathach
dc00f0cae1
update link speed detection for nuc505
2020-07-16 20:44:06 +07:00
hathach
0517f4a2f1
dcd tdi report link speed on reset
2020-07-16 16:12:21 +07:00
Ha Thach
81392da1ea
Merge pull request #456 from me-no-dev/esp32-s2-epin-to
...
ESP32-S2: Detect EP IN Xfer Timeout
2020-07-10 12:29:06 +07:00
hathach
0fd074afd8
change REDUCE_SPEED=0/1 to explicitly SPEED=high/full
...
update readme, boards.md to add link to new stm boards
2020-07-08 16:29:48 +07:00
Ha Thach
a192d99bf0
Merge pull request #457 from UweBonnes/add-stm-hs
...
Add stm hs
2020-07-05 14:07:08 +07:00
Uwe Bonnes
fd38178189
STM32/OTG_HS: Allow OTG_HS port to run at FS speed.
...
Add "REDUCE_SPEED=1" to the compile options.
2020-07-03 10:52:57 +02:00
hathach
ad5ae8c31d
update per review
2020-07-03 14:50:39 +07:00
hathach
a09a86d299
fix NVIC disable typo
2020-07-03 01:19:02 +07:00
me-no-dev
d493724a7b
ESP32-S2: Detect EP IN Xfer Timeout
...
In some rare ocasions (bad cable, noise, etc.) data transfer might timeout and hang the endpoint, unless the interrupt flag is cleared.
This pull request targets to solve that case.
2020-07-02 13:05:17 +03:00
hathach
4cec866994
correct HSE_VALUE in hal_conf
...
- although it is define in CFLAGS, it is worth to correct to be
consistent with other build
- extract set_speed()
2020-07-02 14:57:00 +07:00
hathach
9a290febcd
change default port some stm bsp
...
- f769disco default port is highspeed port1
- remove PORT0 on stlink since the board only populated HS connector
2020-07-02 11:58:40 +07:00
hathach
4966fb2e13
clean up
2020-07-02 01:25:21 +07:00
hathach
c2289777f7
Merge branch 'add-stm-hs' of github.com:hathach/tinyusb into add-stm-hs
2020-07-01 23:53:33 +07:00
Uwe Bonnes
196bdbc702
st/synopsys/dcd_synopsys.c: Remove USBC PHY PLL stabilization delay for now
...
While the ST code has a 2 ms stabilization delay for the USBC PHY PLL,
running without this delay showed no problem for at leat 10 USB un/replug
cycles. Observe for problems!
2020-07-01 14:45:07 +02:00
hathach
d2450abaaf
only set turnaround in reset complete
2020-07-01 18:51:04 +07:00
hathach
e3974d6869
correctly set turn around according to cpu clock
...
help to run with low speed mcu
2020-07-01 18:44:52 +07:00
hathach
a512a31c9d
Merge branch 'master' into add-stm-hs
2020-07-01 17:58:02 +07:00
hathach
ed1b670c55
clean up code
2020-07-01 17:57:37 +07:00
me-no-dev
6178f8de2f
ESP32-S2: Handle the fact that available EP IN FIFOs are less than the number of available EP INs
...
ESP32-S2 has only 5 available endpoint-in FIFOs (including EP0) but 7 available EP IN numbers. This change decouples the fifo number from the endpoint number, providing FIFO numbers until they reach the limit, at which point it will return false and assert an error that too many endpoints were allocated.
2020-07-01 13:38:59 +03:00
Jan Dümpelmann
378e6aab8c
Clear ep0_pending if rx short packet
2020-06-30 17:56:25 +02:00
Jan Dümpelmann
9e35ef73f7
Fix receiving of short packet data (ep out)
2020-06-30 12:55:39 +02:00
Uwe Bonnes
30a18e2605
stm32f723disco: USB HS enumerates.
2020-06-30 11:07:53 +02:00
Uwe Bonnes
05bfd9ac4a
dcd_synopsys: Handle HS and FS IP in one device
...
FIXME: Allow run-time selection to allow to handle both HS and FS with
one file
F746 HS port enumerates with error
config 1 interface 2 altsetting 0 bulk endpoint 0x3 has invalid maxpacket 64
2020-06-30 11:02:41 +02:00
hathach
ab75998316
Merge branch 'master' into add-stm-hs
2020-06-30 01:55:57 +07:00
Ha Thach
05996aee64
Merge pull request #427 from kasjer/kasjer/add-da1469x-support
...
Support for DA1469x MCU from Dialog Semiconductor
2020-06-30 01:20:56 +07:00
Ha Thach
268ab9eaa8
Merge pull request #399 from duempel/redesign_synopsys_receive
...
Improvements to Synopsys EP OUT
2020-06-29 16:02:40 +07:00
Jan Dümpelmann
99df7789a7
Add author name to dcd_synopsys.c
2020-06-29 10:55:03 +02:00
Jan Dümpelmann
4f69bcea7e
Remove EP0 remaining bytes manipulation
...
Renaming edpt_xact to edpt_schedule_packets
2020-06-26 17:18:25 +02:00
Jeff Epler
b2ef8cdd42
dcd_samd: Provide implementation for OPT_MCU_SAME5X
2020-06-25 18:51:04 -05:00
hathach
d4d6e06c1d
added OPT_MCU_SAME5X option
2020-06-24 00:53:17 +07:00
Jan Dümpelmann
067287ef91
Add transaction (edpt_xact) as sub transfer
...
A transfer can have one or multiple transactions.
Usually only EP0 splits one xfer into multiple xact.
2020-06-18 17:18:28 +02:00
Mengsk
9ffb9b69a4
Disable SOF in dcd_stm32_fsdev
...
Signed-off-by: Mengsk <admin@hifiphile.com>
2020-06-18 14:18:00 +02:00
Mengsk
57b553e023
Fix IAR warnings.
...
Pa039 : use of address of unaligned structure member.
Pe188: enumerated type mixed with another type.
2020-06-17 10:08:33 +02:00
hathach
667eaa6dd6
fix stm32h743 priority with freeRTOS
2020-06-16 00:03:52 +07:00
hathach
2dd1be13e5
Enhance EP FIFO allocation for both Fullspeed and Highspeed
...
- Update shared RX FIFO calculation with FS/HS
- IN FIFO EP
- Interrupt -> use EPSize
- Bulk/ISO -> use max(EPSize, remaining-fifo / non-opened-EPIN)
2020-06-15 23:17:49 +07:00
Jan Dümpelmann
4399dd1b06
cherry pick PR399 commit : Interrupt time improvements
2020-06-14 19:13:31 +07:00
hathach
f438aedccb
overwrite setup packet
2020-06-14 18:29:38 +07:00
Jerzy Kasenberg
0635bafe0a
Add DCD for Dialog DA1469x MCU
...
Dialog Semiconductor's BLE MCU DA1469x comes with full speed USB.
It's base on National Semiconductor discrete USB controller USBN9603/4.
This adds support for:
- control/interrupt/bulk endpoints (up to 64 bytes)
- ISO endpoint were not tested and may not work correctly
- reset/sleep/wakeup are handled
- code for VBUS changes is provided
2020-06-09 15:55:46 +02:00
hathach
710c54f8cb
allow hs ep open with 512 bytes
2020-06-01 01:36:09 +07:00
hathach
f771afe6af
fixed EP0 size to 64 since LS is not supported in device mode
...
- set turn-around and report actual speed in Enum Done
- add dcd_event_bus_reset() helper to report speed
2020-05-31 23:43:29 +07:00
hathach
5ffba8536d
able to detect as hs
2020-05-31 19:41:22 +07:00
hathach
d4bf777c94
try to get synopsys work with OTG HS + external PHY
2020-05-27 11:01:33 +07:00
hathach
b4804d1592
random clean up for tdi
2020-05-26 22:15:38 +07:00
hathach
947c3eb10d
multiple port support for global otg base
2020-05-26 16:07:48 +07:00
hathach
b7ab60aa44
suporting multiple port (OTG FS + HS) for stm32
2020-05-26 15:52:02 +07:00
hathach
ff9994116e
fix nrf hanged (blocking wait) when called within critical section
2020-05-21 21:22:12 +07:00
hathach
550746097b
fix cast-align warning for nuc505
2020-05-18 13:03:41 +07:00
hathach
1a8ce043ed
enable -Wcast-align
...
suppress vendor sdk driver at board.mk
2020-05-17 14:24:15 +07:00
Jan Dümpelmann
42edbc0006
Allow EP0 to use xfer sizes larger than one packet
2020-05-15 22:26:14 +02:00
Jan Dümpelmann
28696de390
Interrupt time improvements
2020-05-15 18:21:44 +02:00
Jan Dümpelmann
3401e0f6ff
Synopsys OUT EP improvements:
...
- Use register based XFRSIZ to determine transfer complete
(xfer->queued_len and xfer->short_packet were deleted)
- Pop out as many RxFIFO data entries as available within a IRQ call
- less application interruption due to XFRC calls
2020-05-08 18:10:48 +02:00
hathach
58b99e59d4
detect if SD is actually present on the flash using SD magic
...
even with SOFTDEVICE_PRESENT defined, SD may not be present on actual
flash.
2020-05-05 23:07:56 +07:00
Ha Thach
101f234a16
Merge pull request #387 from duempel/redesign_transmit_synopsys
...
Redesign of Synopsys device transmission
2020-05-04 14:41:20 +07:00
Jan Dümpelmann
fd69cc3dcc
clean up
...
renaming function and variables
changing indent size
2020-05-04 07:59:13 +02:00
hathach
0e30afa691
abstract all UDP_CSR
2020-05-02 18:24:23 +07:00
hathach
3ad0cd041b
clean up
2020-05-02 16:29:22 +07:00
hathach
ac3c645dc1
fix EP0 data toggle issue
2020-05-02 16:09:28 +07:00
hathach
2a479175ae
remove toggle walkaround, fix control stall race condition
2020-05-02 14:51:21 +07:00
hathach
a74a823b0a
fix dcd samd race condition with setup packet
...
setup packet can complete together with previous status (in & out).
Always make sure to prepare valid buffer for holding setup packet when
queuing control status.
2020-04-30 00:29:47 +07:00
Jan Dümpelmann
59ff208c65
Changed switch into if statements
2020-04-29 12:37:29 +02:00
Jan Dümpelmann
3e6feb7f6d
Redesign of Synopsys device transmission
...
Changes:
- checking if tx buffer empty interrupt is masked
- process more than one packet in isr
- mask tx buffer empty just after all bytes were written
- use of transmit_fifo_packet instead of transmit_packet
2020-04-29 11:32:22 +02:00
hathach
958b5510cb
added comment for hw clearing TXFE
2020-04-27 13:17:47 +07:00
hathach
e785b09118
TXFE is read only bit
2020-04-27 12:06:14 +07:00
hathach
00fcf829a1
sync synopsis fix for esp32s2
2020-04-26 22:41:04 +07:00
hathach
8d18d6077b
turn off TX FIFO Empty for EPIN if all bytes are written
...
fix dcd synopsys issue with usbnet #289
2020-04-26 22:14:59 +07:00
Jerzy Kasenberg
b949ae596f
synopsys: Reduce interrupt time for IN ZLP
...
For IN endpoints output FIFO is filled in interrupt, therefor before
endpoint is enabled, DIEPTSIZ is set with correct size of packet.
Then endpoint is enabled and FIFO empty interrupt is enabled.
This works fine except for the ZLP. Enabling FIFO empty interrupt
results in interrupt handler being called all the time because
there is nothing to put in the FIFO.
Eventually it ends when IN token is received and empty
packed is transmitted out.
This change does not enable FIFO empty interrupt for ZLP reducing
CPU load.
2020-04-24 17:38:30 +02:00
Jan Dümpelmann
551724498a
Added support for STM32F1 Connectivity Line MCU
...
STM32F105 and STM32F107 are using the Synopsys IP
2020-04-22 17:39:53 +02:00
hathach
1f442c0a9a
also add wakeup event
2020-04-18 23:48:36 +07:00
hathach
c3fc5f1595
session end interrupt doesn't trigger on esp32 saola board
...
it is possibly due to the board design without vbus sense. Revisit
later.
2020-04-18 23:42:51 +07:00
hathach
fa71402e17
implement disconnection detection for stm32 synopsys
...
- disconnection is OTG INT session end bit
- add USE_SOF to disable 1ms interrupt on mcu which isn't used now by
the stack
- add suspend detection
2020-04-18 23:40:27 +07:00
hathach
6f9c256ad0
complete remove dcd_set_config(), fix unit test
2020-04-17 13:52:34 +07:00
hathach
05476d9ad7
Merge branch 'master' into remove-dcd-set-config
2020-04-17 13:38:22 +07:00
Ha Thach
85f0894fff
Merge pull request #347 from majbthrd/nuc505_config
...
nuc505: change dcd_set_config() behavior
2020-04-17 13:36:16 +07:00
Ha Thach
1f69807621
Merge pull request #354 from hathach/cxd56-disconnect-connect
...
Cxd56 disconnect connect
2020-04-17 13:12:47 +07:00
hathach
dddf30f532
added disconnect for spresense
2020-04-17 12:53:42 +07:00
hathach
50be9d7c3a
mass rename tud/dcd_irq_handler to tud/dcd_init_handler
2020-04-17 12:27:53 +07:00
hathach
89f99426fc
add code for disconnect/connect (not tested)
2020-04-17 11:48:49 +07:00
Ha Thach
4bbbba48cb
Merge pull request #351 from hathach/valentyusb-dcd-disconnect-connect
...
Valentyusb dcd disconnect connect
2020-04-17 09:52:29 +07:00
Ha Thach
19e2eb66c0
Merge pull request #350 from hathach/synopsys-msp430-dcd-disconnect-connect
...
Synopsys msp430 dcd disconnect connect
2020-04-17 09:51:15 +07:00
Ha Thach
9aa553ccc2
Merge pull request #352 from hathach/samg-dcd-disconnect-connect
...
samg implement dcd connect/disconnect
2020-04-16 23:14:42 +07:00
Ha Thach
33610751d7
Merge pull request #336 from pigrew/edpt_close
...
> If you notice my chain of events above, the bulk transfer was started BEFORE the SET_INTERFACE call. The USB device hardware swaps the order of them being delivered. On STM32, it gives priority to the lower-numbered EP index.
It shouldn't be a matter, control is 2+ stage, before sending the setup. Host should stop all communication to the endpoint that It wants to close.
2020-04-16 23:10:36 +07:00
hathach
36d4efa077
samg implement dcd connect/disconnect
2020-04-16 22:59:19 +07:00
hathach
6377699d77
implement dcd disconnect connect
2020-04-16 22:30:33 +07:00
hathach
3aaad8cd73
add int enable/disable for pullup
2020-04-16 21:30:12 +07:00
hathach
18d936b414
msp430 disconnect/connect
2020-04-16 21:04:28 +07:00
hathach
63655ac9d7
cleanup for esp32
2020-04-16 20:43:26 +07:00
hathach
4c74140b31
stm32 sysnopsys disconnect/connect
2020-04-16 20:20:20 +07:00
hathach
a009775745
dcd disconnect/connect for transdimension ip
2020-04-16 16:56:16 +07:00
hathach
418b69f2db
implement dcd disconnect/connect for lpc ip3511
2020-04-16 16:05:57 +07:00
hathach
969121df4f
added dcd disconnect/connect to lpc17/40
2020-04-16 15:52:45 +07:00
Peter Lawrence
b9fca0bbb4
nuc505: change dcd_set_config() behavior
2020-04-15 14:16:48 -05:00
Nathan Conrad
b0270f499b
stm32fsdev: dynamic allocation of PMA.
2020-04-15 11:53:30 -04:00
Nathan Conrad
16f65890eb
Merge branch 'master' into edpt_close
2020-04-14 10:22:03 -04:00
Nathan Conrad
bbc59f1ceb
stm32fsdev: add static assert for PMA size bigger than EP0 size.
2020-04-13 20:50:17 -04:00
Nathan Conrad
f8e7487355
edpt_close: Updated based on feedback.
2020-04-13 09:51:46 -04:00
hathach
f4df829399
lpc17xx move set configdevice into set address
...
for removing dcd_set_config()
2020-04-13 17:04:18 +07:00
Nathan Conrad
0eeaccaf46
Skeleton, and initial stm32fsdev implementation (that leaks memory)
2020-04-12 21:27:27 -04:00
Ha Thach
04a06ec401
Merge branch 'master' into refactor-irqhandler
2020-04-11 15:49:34 +07:00
Ha Thach
13a3081d30
Merge pull request #333 from hathach/fix-esp32s2-setup-packet
...
fix incorrect setup packet
2020-04-11 15:18:41 +07:00
Ha Thach
07809d03a7
Merge pull request #332 from pigrew/stm32fsdev-dcdconnect
...
stm32fsdev: Implement dcd_connect.
2020-04-11 13:20:31 +07:00
hathach
ae1314f1c7
fix incorrect setup packet
...
also increase usbd stack in example when debug is enabled
2020-04-11 12:55:45 +07:00
Ha Thach
2ff3f765db
Merge pull request #319 from hathach/add-esp32s2
...
port ESP32 S2
2020-04-10 23:53:03 +07:00
hathach
a37a56acd3
remove CONFIG_IDF_TARGET_ESP32S2BETA per review
2020-04-10 23:38:36 +07:00
Nathan Conrad
5bd9d14fc1
stm32fsdev: set dcd_connect API definitions to strong, Modify documentation.
2020-04-10 10:26:41 -04:00
hathach
8953bc9255
added comment note for beta chip walkaround
2020-04-10 20:25:53 +07:00
hathach
c545cfc0bc
Correct dedicated FIFO SRAM size to 1024
...
add note for up to 5 active IN endpoints (including EP0 IN)
2020-04-10 15:42:50 +07:00
hathach
978eec73b3
remove 100us delay at the end of dcd_init()
2020-04-10 15:39:59 +07:00
hathach
30945ab9f3
revert name to dcd_int_handler due to function prototype warning
2020-04-10 15:27:23 +07:00
hathach
c0695b4b55
clear USB_RXFLVI_M before read_rx_fifo()
...
more format clean up
2020-04-10 15:13:12 +07:00
hathach
933e3cdfc7
change indent from 4 -> 2 spaces
2020-04-10 15:01:12 +07:00
hathach
cec747776d
rename dcd_init_handler to dcd_irq_handler to consistent with other ports
2020-04-10 14:47:02 +07:00
hathach
d122d7de88
remove commented code
2020-04-10 14:45:55 +07:00
hathach
a40d1e800d
try to fix racing condition with setup
2020-04-10 14:04:18 +07:00
Nathan Conrad
715c4dbbf8
stm32fsdev: Implement dcd_connect.
2020-04-09 17:03:12 -04:00
hathach
d6578823bb
rename static function for dcd_cxd56 to prevent conflict
2020-04-09 12:00:45 +07:00
hathach
c1f3fbbc03
implement dcd connect/disconnect for samd and nrf
2020-04-09 11:47:02 +07:00
Ha Thach
defea45d44
Merge branch 'master' into refactor-irqhandler
2020-04-09 11:22:20 +07:00
hathach
40e23672ff
rename hal_dcd_isr to dcd_irq_handler for fomu
2020-04-08 16:47:20 +07:00
hathach
e879ad1e6f
move irq from msp430
2020-04-08 16:42:36 +07:00
hathach
8f17945b67
move irq for stm32 synopsys
2020-04-08 16:37:09 +07:00
hathach
9014ca5528
move irq for stm32 fsdev
2020-04-08 16:26:14 +07:00
hathach
880595433c
use macro for easy enable/disable SOF
2020-04-08 15:41:16 +07:00
hathach
7b7a78ab2e
disable SOF interrupt since it is not used for now
2020-04-08 15:33:07 +07:00
Peter Lawrence
ccb65fcf6a
nuvoton: add dcd_disconnect() dcd_connect()
2020-04-07 10:51:55 -05:00
hathach
06e87b47a2
revert name to dcd_init_handler()
...
since the function signature is different
2020-04-06 21:28:02 +07:00
hathach
22a9b05834
rename dcd_int_handler to dcd_irq_handler for consistency with other port
2020-04-06 19:49:25 +07:00
hathach
06377a341b
add tud_irq_handler() for all lpc ip3511 (13, 15, 11)
2020-04-06 18:00:37 +07:00
hathach
138965d1d1
add tud_irq_handler() to all NUC board
2020-04-06 17:43:56 +07:00
hathach
4179334aca
call tud_irq_handler() for all nrf5x board
2020-04-06 17:35:11 +07:00
hathach
fb05451a26
mass rename dcd_isr() to dcd_irq_handler()
2020-04-06 17:24:22 +07:00
hathach
050de0ec33
fix issue and typo with In token when Fifo empty
...
fix transmit packet endpoint's fifo
2020-04-06 16:32:55 +07:00
hathach
2d6d298302
move irqhandler to application
...
tud_isr() must be called by application to forward the irqhandle to the
stack
2020-04-06 14:11:45 +07:00
hathach
1e7c3cf95e
update dcd esp32s2 fifo allocation to match current dcd synopsys
2020-04-03 17:09:38 +07:00
hathach
a3e50242b9
add dcd_esp32s2
...
skip esp32s2_saola for make build since idf use cmake
2020-04-01 17:07:28 +07:00
Ha Thach
435485b524
Merge pull request #304 from pigrew/stm32_xfer_rewrite
...
STM32FSDEV: Rewrite transfer ISR
2020-03-25 10:19:07 +07:00
Ha Thach
95009a9e79
Merge pull request #194 from cr1901/msp430f5529
...
[WIP] MSP430 Support
2020-03-24 11:57:20 +07:00
William D. Jones
6b5157fd28
dcd_msp430x5xx: Add dummy dcd_edpt0_status_complete handler. Add
...
comment which describes why it might be needed.
2020-03-24 00:03:12 -04:00
Nathan Conrad
eaf767b0db
STM32FSDEV: Rewrite transfer ISR
2020-03-22 14:26:48 -04:00
hathach
4f871063fd
Merge branch 'master' into cr1901-msp430f5529
2020-03-22 17:19:57 +07:00
hathach
a93548cfe9
update comment per review
2020-03-17 23:39:53 +07:00
hathach
a39d170672
follow up to pr #301
...
rename OPT_MCU_NUC505_USB_DMA to simply USE_DMA
2020-03-17 10:40:45 +07:00
Peter Lawrence
df05440d92
NUC505 : added comment on DMA choice
2020-03-16 13:20:17 -05:00
Peter Lawrence
fb56c02a6f
NUC505 : fix operation with net_lwip_webserver
2020-03-15 17:44:09 -05:00
hathach
71fb3985ba
Merge branch 'nuc120' of https://github.com/majbthrd/tinyusb into majbthrd-nuc120
2020-03-10 11:53:11 +07:00
hathach
e0cdab5bf7
fix stm32 fsdev epdesc
2020-03-08 16:28:21 +07:00
hathach
c8247f0907
fix zlp for nrf52840
2020-03-08 14:20:28 +07:00
Ha Thach
5f5ee465a6
Merge pull request #291 from hathach/port-samg55
...
Port samg55
2020-03-07 16:38:59 +07:00
Peter Lawrence
7d8ecc63a6
add Nuvoton NUC505
2020-02-07 20:11:00 -06:00
hathach
46f22860fb
correct waklaround with only status IN
...
correct usb descriptor msc dual example to work with samg
2020-02-07 22:13:38 +07:00
hathach
02b2c60231
samg55 work with cdc msc example
2020-02-07 17:39:20 +07:00
hathach
087e3c7f56
Merge branch 'master' into port-samg55
2020-02-07 16:50:07 +07:00
hathach
9ca6311ac4
implement walkaround for incorrect DATA Toggle for status control.
2020-02-07 16:46:18 +07:00
Peter Lawrence
cd8eb2a06b
added support for Nuvoton NUC120
2020-01-25 13:10:32 -06:00
hathach
e2f60a5134
rt10xx: correct max endpoint count is 8
2020-01-17 17:09:23 +07:00
hathach
04d8671641
clean up, disable SOF for dcd trans since we don't use it for now
2020-01-17 12:59:00 +07:00
hathach
3208fe00b6
clean up
2020-01-17 12:06:59 +07:00
Ha Thach
1f95f439e1
Merge pull request #274 from tannewt/dcache
...
Clean and invalidate the DCache when we have one.
2020-01-17 09:47:38 +07:00
Scott Shawcroft
cd6454a330
Add if guards for dcache flushes.
2020-01-16 17:17:49 -08:00
Scott Shawcroft
ae68668df9
flush and invalidate the dcache
2020-01-15 21:59:15 -08:00
Ha Thach
12b191510a
Merge branch 'master' into nucbusreset
2020-01-16 11:22:33 +07:00
Ha Thach
537ceb0f65
Merge branch 'master' into line_endings
2020-01-16 10:55:14 +07:00
Peter Lawrence
2ed395bde3
nuc121: survive USB bus reset
2020-01-15 21:40:24 -06:00
Peter Lawrence
c04bc07c29
nuc121: enhanced driver and hopefully added readability
2020-01-15 20:09:50 -06:00
Nathan Conrad
25c1bea782
Normalize line endings
2020-01-15 14:47:43 -05:00
Peter Lawrence
7f2db321bf
nuc121: better fix for handling large OUT transfers
2020-01-15 10:23:23 -06:00
Peter Lawrence
f2a5335417
nuc121: fix handling of OUT transfers larger than max packet size
2020-01-14 22:07:38 -06:00
Sean Cross
a6b916ba85
Merge pull request #269 from antmicro/volatile_buffers_fix
...
dcd_eptri: Fix rx_buffer/tx_buffer volatile annotation
2020-01-15 07:02:11 +10:00
Mateusz Holenko
c1781e5e7c
dcd_eptri: Fix rx_buffer/tx_buffer volatile annotation
...
This makes `rx_buffer` and `tx_buffer` *pointers*
volatile in order to avoid caching them in a register.
The original notation meant "a pointer to a volatile value"
(equivalent of `volatile uint8_t *`). This resulted in
`while(rx_buffer[ep_num] != NULL) ;` loop to get stuck
forever, even though the IRQ handler set the `rx_buffer[ep_num] = NULL`.
2020-01-14 13:57:17 +01:00
Ha Thach
130250a2be
Merge branch 'master' into nuc121
2020-01-07 16:26:58 +07:00
Peter Lawrence
5c5f876461
dcd_nuc121: allow user ZLP transfers to get a callback
2020-01-04 13:36:26 -06:00
Peter Lawrence
f4371e79b1
add Nuvoton NUC121/NUC125/NUC126
2020-01-04 10:31:55 -06:00
hathach
89f3ad59da
fix #247
2019-12-27 09:42:57 +07:00
hathach
0da45c2e78
clean up
2019-12-26 22:31:29 +07:00
hathach
b5684c5c10
merge dcd_samd51 & dcd_samd21 into dcd_samd
2019-12-26 21:46:59 +07:00
hathach
49b316143a
improve samd, fix missing setup packet occasionally
2019-12-26 17:11:24 +07:00
hathach
5690e7b304
fix samd51 setup packet handling
...
issue occur due to race condition
https://github.com/adafruit/Adafruit_TinyUSB_Arduino/issues/37
2019-12-25 23:47:47 +07:00
hathach
bbada1d3e6
adding lookup table for debugging
...
add msc scsi command list
2019-12-23 18:54:06 +07:00
hathach
94e70f9b01
Merge branch 'master' into port-samg55
2019-12-21 23:53:48 +07:00
hathach
421221baa5
making more progress, but failed with WRITE10
...
incorrect queue 448 bytes instead of 512
2019-12-21 23:51:57 +07:00
hathach
050fa2fd39
able to response to scsi inquiry, but failed to response to test unit ready
2019-12-21 19:33:41 +07:00
Ha Thach
7a05b177a4
Merge pull request #236 from jeremyherbert/master
...
Update dcd_stm32_fsdev.c with note about F042Fx remapping
2019-12-12 10:17:40 +07:00
Jeremy Herbert
9d96b6d66e
Update dcd_stm32_fsdev.c
...
Add a note about pin remapping for the STM32F042Fx
2019-12-12 09:40:06 +10:00
hathach
96a9eca6a0
move VBUS sense out of dcd_synosys to bsp
2019-12-11 14:03:36 +07:00
hathach
752aea7d72
enhance samg
2019-12-09 23:58:13 +07:00
hathach
fa96078882
clear data toggle in clear stall, also set config bit
2019-12-09 23:21:06 +07:00
hathach
75a2157715
fix samd using TUSB_REQ_SET_ADDRESS in dcd_edpt0_status_complete
2019-12-09 23:20:21 +07:00
hathach
0316e0ecd4
update descriptor, enhance ep in transfer
2019-12-09 22:48:35 +07:00
hathach
759fa76280
implementing dcd_edpt_open
2019-12-09 21:36:15 +07:00
hathach
988edce745
fix build
2019-12-09 18:49:38 +07:00
hathach
208a77678c
clean up, switch and update submodule samd to circuitpython branch
2019-12-09 18:37:54 +07:00
Sean Cross
26dcc19b18
valentyusb: eptri: don't double-advance read buffer
...
Due to an error, we were double-advancing the FIFO buffer. The end
result was that the second half of most reads were getting ignored.
This wasn't found during earlier testing because only 64-byte buffers
were tested.
This corrects this error by avoiding double-advancing the buffer.
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-29 18:14:23 +08:00
hathach
e9725dcdbe
use dcd_edpt0_status_complete() to prepare for setup packet for samd21/samd51
2019-11-28 13:48:55 +07:00
hathach
d7558e8a0f
use dcd_edpt0_status_complete() to set address without blocking for samd21/samd51/stm32_fsdev
2019-11-28 13:39:29 +07:00
hathach
ac701c398b
clean up
2019-11-28 12:18:56 +07:00
hathach
552cc3ef33
implement dcd_edpt_stall
2019-11-28 11:56:35 +07:00
hathach
5dc04887e2
get passed set address
2019-11-28 11:48:08 +07:00
hathach
6bc245cb36
add dcd_edpt0_status_complete() which is useful for several mcu port
2019-11-28 11:46:36 +07:00
hathach
40b454cf28
get passed first get device descriptor
2019-11-27 23:20:48 +07:00
hathach
6225d5bcfd
able to handle setup packet
2019-11-27 16:01:25 +07:00
hathach
bc21714c7e
detect bus reset
2019-11-27 14:49:19 +07:00
hathach
745f0b4521
clean up
2019-11-27 11:02:24 +07:00
hathach
c691dc4cb2
update
2019-11-25 10:42:32 +07:00
hathach
58e8265964
usb hw init OK
2019-11-24 23:46:28 +07:00
hathach
24b2cea139
Merge branch 'master' into port-samg55
2019-11-24 21:22:42 +07:00
hathach
d991466a8e
fix rt1010 rt1020 only has 1 usb controller, rt1050 rt1060 has 2
2019-11-23 00:48:56 +07:00
hathach
38b14725f7
rename OPT_MCU_IMXRT10XX to OPT_MCU_MIMXRT10XX
2019-11-22 17:40:12 +07:00
hathach
281e8cd9ec
rename OPT_MCU_RT10XX to OPT_MCU_IMXRT10XX
2019-11-22 15:42:46 +07:00
Ha Thach
ca741dfc2a
Merge pull request #220 from hathach/develop
...
Port NXP iMX RT10XX
2019-11-22 15:16:41 +07:00
hathach
6123b600fc
rename dcd_lpc18_43 to dcd_transdimension
2019-11-22 14:47:07 +07:00
hathach
a0b2561a2d
move nxp dcd ehci controller reset and modde into dcd
...
rt1064 work with cdc msc example
2019-11-22 14:20:10 +07:00
hathach
fca4653b95
able to compile dcd 18/43 with rt1064
2019-11-22 12:34:41 +07:00
hathach
2ead26a12d
more clean up
2019-11-22 12:26:40 +07:00
hathach
ccb09db3b7
more clean up
2019-11-22 12:16:47 +07:00
hathach
7e16a9a1db
more constant rename clean up
2019-11-22 12:14:55 +07:00
hathach
8aacd1eacd
refactor dcd_lpc18_43, making it capatible with rt10xx
2019-11-22 12:11:13 +07:00
hathach
623b16af2e
clean up dcd lpc18_43
...
drop supporting both device mode on both ports.
2019-11-22 00:58:18 +07:00
hathach
1f52273d99
move dcd_lpc18_43.h into .c file
2019-11-22 00:38:22 +07:00
hathach
f5d737aa7e
moving irq to bsp for lpc17/40
2019-11-21 23:19:38 +07:00
hathach
043697ab95
rename lpc 17/18 irq to dcd_isr/hcd_isr
2019-11-21 16:08:08 +07:00
Sean Cross
a9282eab51
eptri: clear proper endpoint when opening IN port
...
When opening a USB port, we ensure the buffer is NULL and has
a length of 0.
Due to a mistake in specifying the endpoint type, we never actually
cleared the value when opening an IN endpoint. This patch fixes
the comparison when opening an IN endpoint.
This fixes issue #218 .
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-20 17:45:21 +08:00
Sean Cross
8c5f02960b
valentyusb: rename from `foosn`
...
While Fomu is produced by Foosn, the actual name of the hardware
block is `valentyusb`. Rename the module to match that.
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:08:47 -08:00
Sean Cross
e05e9801e4
fomu: gate debug/logging features
...
This gates the majority of the debug and logging features behind
testable macros.
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:08:47 -08:00
Sean Cross
3292920933
fomu: first stable working commit
...
This appears to be stable, and works well.
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:08:47 -08:00
Sean Cross
1882a87212
fomu: remove reference to SETUP_CTRL.ACK
...
THis bit isn't used anymore, so remove it.
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:08:47 -08:00
Sean Cross
729c8d073c
fomu: dcd_fomu: add next_ev support
...
Now that we have the `USB_NEXT_EV` register, take advantage of
it to work around issue #207 .
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:09:38 -08:00
Sean Cross
913032ae1d
dcd_fomu: nearly there
...
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:08:01 -08:00
Sean Cross
835a72c595
fomu: semi-working dcd file
...
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:08:01 -08:00
Sean Cross
843136d0e4
fomu: commit latest version
...
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:08:01 -08:00
Sean Cross
22fd7bf85e
fomu: first fully-working release
...
This is able to transfer lots of data back and forth across MSC.
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:08:01 -08:00
Sean Cross
0559fd13fb
fomu: fix some issues with dcd_fomu
...
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:08:01 -08:00
Sean Cross
32bb68409e
portable: fomu: get msc to enumerate
...
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:03:12 -08:00
Sean Cross
36ede44885
fomu: wip support
...
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:03:12 -08:00
hathach
4008f0d1e6
update dcd nrf5x to be indepent from nrf_usbd.h
...
fix build error with nrfx 2.0
2019-11-11 00:01:12 +07:00
hathach
6baa79b330
board test works
2019-11-04 14:54:04 +07:00
William D. Jones
5d585c03bd
dcd_msp430x5xx: Improve comments regarding SETUP packet handling.
2019-10-29 14:08:39 -04:00
William D. Jones
3f0f7cfd07
dcd_msp430x5xx: Clarify hardware STALL behavior and current vs ideal
...
behavior of driver in comments.
2019-10-29 12:52:56 -04:00
hathach
4e8c57171c
Merge branch 'master' into cr1901-msp430f5529
2019-10-25 21:20:05 +07:00
William D. Jones
d0146be00b
dcd_msp430x5xx: Fix typo in copy-paste in transmit_packet.
2019-10-10 04:19:48 -04:00
William D. Jones
c8e899fef0
dcd_msp430x5xx: Improve SETUP packet and EP0 NAK interactions, per
...
42.3.1.3 in Reference Manual; fix is incomplete but works.
2019-10-10 04:02:35 -04:00
hathach
c42edc080c
Merge branch 'master' into develop
2019-10-09 11:03:55 +07:00
Kamil Tomaszewski
0cea82568c
Disable/enable only USB interrupt
2019-10-08 09:58:56 +02:00
Kamil Tomaszewski
9923604221
Send SUSPEND and RESUME signals
2019-10-07 14:04:48 +02:00
Kamil Tomaszewski
b3872febe2
Disable/enable interrupt
2019-10-07 14:03:02 +02:00
Kamil Tomaszewski
0747c4b61b
Add Spresense board
2019-10-04 13:19:34 +02:00
hathach
281cd858b0
adding lpc1549, but couldnt recieve setup packet, though setup received interrupt is triggered
2019-10-04 15:56:45 +07:00
William D. Jones
5ee1070c16
Merge remote-tracking branch 'origin' into msp430f5529
2019-10-02 23:18:49 -04:00
William D. Jones
05914de109
dcd_msp430x5xx: Fix typos in dcd_edpt_clear_stall.
2019-10-02 22:36:45 -04:00
William D. Jones
3edb5548e9
dcd_msp430x5xx: Ensure DBUF bit is cleared on endpoint open, as it
...
could get spuriously set in debugging sessions. cdc_msc functional.
2019-10-02 01:19:12 -04:00
hathach
820a3705f5
Merge branch 'master' into develop
2019-10-02 12:13:47 +07:00
hathach
0673be7724
ported stm32f1, tested with f103 blue pill
2019-10-02 12:01:34 +07:00
Nathan Conrad
1e193212d7
Add testcase for EP0 stall recovery to USBTMC test script.
2019-10-02 00:31:47 -04:00
Nathan Conrad
e5f38e3e86
Remove references to EP kind.
2019-10-02 00:11:16 -04:00
Nathan Conrad
838cfe02c1
Merge remote-tracking branch 'origin/master' into ST_FSDEV_EP0
2019-10-02 00:09:07 -04:00
William D. Jones
19ee519926
dcd_msp430x5xx: Correct byte count masks in transmit/receive routines.
2019-10-02 00:01:58 -04:00
William D. Jones
54478aaa2a
dcd_msp430x5xx: Add STALL support for nonzero endpoints.
2019-10-01 23:28:41 -04:00
William D. Jones
fad44c03c8
dcd_msp430x5xx: Fix TOGGLE bit behavior, clear stall when endpoint
...
opened due to reset potentially not resetting everything.
2019-10-01 23:03:39 -04:00
hathach
d27291f288
Merge branch 'master' into develop
2019-09-30 14:45:34 +07:00
William D. Jones
b623e3023e
dcd_msp430x5xx: Implement receive_packet for all endpoints, correct
...
some mistakes in transmit_packet.
2019-09-29 03:58:30 -04:00
William D. Jones
549ad1d9b6
dcd_msp430x5xx: Fix missing mask when posting IN xfer events.
2019-09-29 03:02:59 -04:00
William D. Jones
838b431fac
dcd_msp430x5xx: Implement transmit_packet for nonzero endpoints. Untested.
2019-09-29 02:43:05 -04:00
William D. Jones
2247f132ca
Implement dcd_edpt_xfer for nonzero endpoints.
2019-09-29 02:22:09 -04:00
William D. Jones
ea0e799df6
dcd_msp430x5xx: Fix clear stall logic.
2019-09-29 02:17:59 -04:00
William D. Jones
529efcc0d2
dcd_msp430x5xx: Implement dcd_edpt_open.
2019-09-29 00:21:40 -04:00
William D. Jones
5d9f833915
dcd_msp430x5xx: Implement STALL logic for EP 0.
2019-09-28 02:09:03 -04:00
William D. Jones
63c94ff684
dcd_msp430x5xx: Improve EP0 IN handling (reuse short_packet field).
2019-09-28 01:51:05 -04:00
William D. Jones
030560792d
dcd_msp430x5xx: Implement dcd_set_address.
2019-09-27 21:59:45 -04:00
William D. Jones
3ac43076da
dcd_msp430x5xx: Implement EP0 IN xfers, clean up.
2019-09-27 21:22:19 -04:00
Nathan Conrad
c4483d244b
Fix typo of CFG_TUD_ENDOINT0_SIZE.
2019-09-27 21:22:19 -04:00
Nathan Conrad
4ccdc5522d
Fix typo of CFG_TUD_ENDOINT0_SIZE.
2019-09-27 12:41:46 -04:00
hathach
6183dbd0ce
add -Wextra for more warnings to example
...
non-stack warning (probably mcu driver) should be suppressed in the
board.mk
2019-09-27 00:15:43 +07:00
Nathan Conrad
f19082f02d
Reset TX and RX endpoints to NAK when receiving setup packet.
2019-09-25 20:55:15 -04:00
Nathan Conrad
048e0448c0
ST FSDEV:Remove setting the EP kind, as I think it was causing issues during enumeration (sometimes). Also move a membar.
2019-09-25 20:54:59 -04:00
William D. Jones
01b4115b0b
dcd_msp430x5xx: Fix Setup packet delay by actually enabling
...
corresponding interrupt.
2019-09-24 04:06:34 -04:00
William D. Jones
550e8215f3
dcd_msp430x5xx: Setup packets are now received successfully (with delay).
2019-09-24 03:43:51 -04:00
William D. Jones
d2e4af5a7b
msp430f5529: Change EP0 size to 8, implement interrupt logic up to bus
...
reset detection.
2019-09-24 02:41:11 -04:00
William D. Jones
950614a841
msp430f5529: Implement dcd_int_enable/disable.
2019-09-23 22:58:49 -04:00
William D. Jones
a6a79df9fb
msp430f5529: Enable clocks/PLL for msp_exp430f5529lp and enable USB
...
module in dcd_msp430x5xx; device does not enumerate.
2019-09-23 18:53:31 -04:00
William D. Jones
907bc3df9b
msp430f5529: Ensure cdc_msc demo compiles.
2019-09-23 17:48:18 -04:00
hathach
7ba8e81852
Merge pull request #177 from cr1901/fifo-fix
...
dcd_synopsys: Fix off-by-one error in FIFO allocation.
2019-09-22 11:38:54 +07:00
William D. Jones
108f756e22
dcd_synopsys: Fix off-by-one error in FIFO allocation.
2019-09-21 23:01:06 -04:00
Nathan Conrad
ce9f133d25
FSDEV: go to NAK when unstalling; on reset, set EP0 to NAK, prioritize reset interrupt, fix small typos.
2019-09-21 12:00:04 -04:00
hathach
94c9cf0eff
doc update
2019-09-20 16:14:35 +07:00
hathach
7b2f8cc73a
added stm32 L0 support
...
close #125
2019-09-20 13:49:33 +07:00
Nathan Conrad
525b4cdb72
Use ESOF for wakeup timing.
2019-09-19 09:51:40 -04:00
Nathan Conrad
642afeea8b
s/static const/define/
2019-09-19 09:30:16 -04:00
Nathan Conrad
85623584f9
Remove debug assertions.
2019-09-19 09:24:52 -04:00
Nathan Conrad
5fcc1468eb
Merge branch 'master' into fsdev_smallPacket
2019-09-19 09:16:48 -04:00
Nathan Conrad
89ffe78f84
ST FSDEV: No need to always reset the interrupt priority, also add some synchronization primitives after disabling interrupts.
2019-09-16 22:56:17 -04:00
Nathan Conrad
a33a854793
Include board header file... :X
2019-09-16 20:56:57 -04:00
Nathan Conrad
d341337c6a
Implement remote wakeup + perhaps better sleep?
2019-09-16 20:25:50 -04:00
Nathan Conrad
6b9783cead
s/unsigned int/uint32_t/
2019-09-16 09:20:15 -04:00
hathach
0c70948d0d
Merge pull request #163 from hathach/develop
...
fix #143
2019-09-16 16:37:27 +07:00
hathach
a37d2d64be
fix #143
2019-09-16 13:32:47 +07:00
Nathan Conrad
05c13342a3
Implement EP with size <64.
2019-09-15 23:51:42 -04:00
Nathan Conrad
18303e742e
Covert macros to inline functions.
2019-09-15 23:46:03 -04:00
Nathan Conrad
ae873a709e
Wrote TX instead of RX.
2019-09-15 23:33:36 -04:00
William D. Jones
6280e4e7cb
msp430f5529: Add empty msp_exp430f5529lp BSP and DCD.
2019-09-14 18:02:17 -04:00
Nathan Conrad
4ea212a432
This demonstrates that I don't pre-build things before committing them... oops.
2019-09-13 23:52:43 -04:00
Nathan Conrad
c831311a12
Off-by-one error in Synopsys assertions. (and move some braces to their own lines.
2019-09-13 23:38:58 -04:00
hathach
986beda9eb
adding stm32l4 support, board test run with stm32l476disco, usb doens't work yet
2019-09-13 11:22:44 +07:00
hathach
ff7261600c
ported stm32f2, added board stm32f207zg nucleo
...
close #127
2019-09-12 10:41:03 +07:00
Nathan Conrad
d3507b0787
Merge remote-tracking branch 'origin/master' into stfsdev_cleanups
2019-09-11 20:36:48 -04:00
Nathan Conrad
3326b9d008
Use types with explicit bit widths.
2019-09-11 20:33:47 -04:00
hathach
7f166d860d
stm32f7 work with dcd synopsis
...
close #124
2019-09-11 22:48:07 +07:00
Nathan Conrad
7b93177890
Use TU_VERIFY_STATIC, use more uint instead of uint8_t/uint16_t. Create reg16_clear_bits function to reduce typec conversion warnings.
2019-09-11 09:45:48 -04:00
Nathan Conrad
784dc52b62
Update header comments.
2019-09-11 09:44:25 -04:00
Nathan Conrad
4cf2b30759
Fix bug where the EPREGs were not being initialized as expected.
2019-09-11 09:43:57 -04:00
hathach
678ba586df
Merge pull request #122 from cr1901/synopsys
...
Synopsys Refactor
2019-09-11 10:37:49 +07:00
Nathan Conrad
4f6bedeac9
Rename the STM32 MCU options.
2019-09-10 12:57:43 -04:00
Nathan Conrad
23d39f2b15
Remove OPT_MCU_STM for L and G series.
2019-09-10 12:13:36 -04:00
Nathan Conrad
65e72de7ce
Move interrupt handler into device driver, and rename the OPT_MCU_STM32 constants.
2019-09-10 09:35:52 -04:00
Nathan Conrad
49c58be4ce
Fix silly typo in the F3xx support.
2019-09-10 01:31:14 -04:00
Nathan Conrad
bc2a65b20b
A few bug fixes, remove the unstested device notices, note supported boards in READMEs, and implement PMA
...
access stride (used on MCU's with 512 byte USB buffers).
2019-09-10 01:03:24 -04:00
Nathan Conrad
f7b0aeec52
Start clock on F0 and F0, and handle USB interrupts.
2019-09-09 19:20:26 -04:00
Nathan Conrad
d1976a30b3
Update F3 BSP and create F070RB BSP. Both are untested (but compile).
2019-09-09 16:14:38 -04:00
Nathan Conrad
5ec59c2a30
Add STM32 FSDEV driver.
2019-09-09 14:55:39 -04:00
Nathan Conrad
b4c8a09f20
Remove STM32 F3 port.
2019-09-09 13:29:26 -04:00
William D. Jones
1385d7c494
stm32: Refactor so F4 and H7 use a single Synopsys IP source file.
2019-09-09 10:48:14 -04:00
William D. Jones
82cd4b5350
dcd_stm32f4: Merge relevant changes from dcd_stm32h7.
2019-09-09 10:27:46 -04:00
William D. Jones
3efc81b285
dcd_stm32h7: Merge relevant changes from dcd_stm32f4. USB2 -> USB works as alias.
2019-09-09 10:14:20 -04:00
hathach
e123cad7bb
enhance dcd stm32f4 to support max 4 or 6 endpoints on 407 or 412
2019-09-08 23:10:51 +07:00
hathach
4663f9084d
ported board stm32f412g discovery
...
- added soft connect for enable pull up register dcd stm32f4
2019-09-08 21:57:02 +07:00
hathach
56f1ccd68a
fix #97
2019-09-05 21:59:19 +07:00
hathach
143a138028
Merge pull request #116 from hathach/develop
...
Board update
2019-09-05 16:18:34 +07:00
hathach
a90e2aa2ce
55s69 device work with usb0
2019-09-05 16:12:13 +07:00
hathach
7350e9c25c
Merge pull request #114 from cr1901/stm32h7
...
STM32H7 Support
2019-09-05 15:29:13 +07:00
William D. Jones
8f8ca77a91
stm32h7: Mark USB FIFOs as volatile, otherwise optimizations will remove
...
reads/writes to the FIFOs.
2019-09-04 01:06:07 -04:00
William D. Jones
910fd867c7
stm32h7: Fix indentation error where OUT XFER interrupt wasn't handled
...
in the correct scope.
2019-09-03 01:37:44 -04:00
William D. Jones
1a3dc9cba1
stm32h7: USB_OTG_FS -> USB2_OTG_FS.
2019-09-03 01:28:41 -04:00
William D. Jones
f703a74daa
stm32h7: Implement STALL logic for endpoints.
2019-09-03 01:28:41 -04:00
William D. Jones
28b131ea94
stm32h7: Implement dcd_edpt_open. cdc_msc_hid demo functional.
2019-09-03 00:37:50 -04:00
William D. Jones
d4302dacc5
stm32h7: Fix accidental overwrite of STUPCNT field in DOEPTSIZ register.
2019-09-03 00:25:21 -04:00
William D. Jones
9210167603
stm32h7: Implement dcd_set_address.
2019-09-02 21:00:30 -04:00
William D. Jones
0d0b802ee0
stm32h7: Implement IN and OUT receive for EP0; device descriptor returned.
2019-09-02 19:32:11 -04:00
William D. Jones
f602534536
stm32h7: Implement setup packet events.
2019-09-02 13:34:33 -04:00
hathach
074681da8b
dma of lpc54114 can also execute up to 64 bytes each transfer
...
There is still issue with cdc_msc_hid example
2019-09-01 17:05:34 +07:00
hathach
aeea6754af
rename lpc_usbd to lpc_ip3511
2019-09-01 16:44:40 +07:00
hathach
3067809957
adding lpc54xxx to dcd, able to go through enumeration
2019-09-01 16:15:23 +07:00
hathach
957201fc58
fix undef __ARM_ARCH_6M__
2019-09-01 11:59:50 +07:00
hathach
2d041aaa1d
clean up
2019-09-01 08:11:22 +07:00
hathach
30f707cad2
rename lpc11_13_15 to simply lpc_usbd since it is almost used by in recent year for nxp mcu
2019-09-01 00:51:58 +07:00
hathach
bac75a81fd
support LPC51u68 #100
2019-08-31 22:44:08 +07:00
William D. Jones
8b165e1024
stm32h7: Ensure FS (and the only) PHY is selected for OTG_HS2.
2019-08-30 22:07:35 -04:00
William D. Jones
7153561984
stm32h7: Enable USB peripheral (device does not enumerate yet).
2019-08-30 21:57:06 -04:00
William D. Jones
0fb9ab9a09
stm32h7: Add empty template cdc_msc_hid example for STM32H743 Nucleo board that compiles.
2019-08-24 12:40:18 -04:00
hathach
47cd08d526
clean up
2019-08-05 22:31:41 +07:00
hathach
d1df041519
nrf5x remove the depenedent on nrfx_power.h
2019-08-05 22:09:37 +07:00
hathach
d211035a0a
merge dcd/hal_nrf5x.c into dcd/dcd_nrf5x.c
2019-08-05 21:54:20 +07:00
hathach
ed6fa460e9
stm32 minor change
2019-07-19 10:59:35 +07:00
hathach
f16ebd512b
indent clean up
2019-07-04 18:45:10 +07:00
hathach
73d7ab201e
remove dcd_edpt_busy()
2019-06-10 22:29:18 +07:00
hathach
13e01c7dca
add TU_ prefix to compiler ATTR to prevent name conflict with application
2019-06-06 10:39:37 +07:00
hathach
3e6d911ce9
more clean up use inline bit funciton instead of macros
2019-05-14 12:54:29 +07:00
hathach
61ec407752
update license year to 2019
2019-05-14 11:48:05 +07:00
hathach
667133304b
fix samd dcd_clear_stall also reset data toggle
2019-05-10 00:10:18 +07:00
hathach
77bc421359
fix clear stall usage, fix reset data toggle with dcd_clear_stall for nrf52
2019-05-09 23:31:18 +07:00
hathach
2050778763
clean up
2019-05-01 20:41:26 +07:00
hathach
64bed848d0
fix #53 use nrfx_usbd_errata.h
2019-04-08 17:36:12 +07:00
hathach
dd9c441a61
samd support suspend and resume. Though cannot distinguish between Suspend and Disconnect
...
should work with #47
2019-04-02 02:14:22 +07:00
hathach
06e1fac7c5
nrf5x enable suspend after set address, instead of set config
2019-04-02 01:20:34 +07:00
hathach
2cc4ab2aef
nrf5x added LOWPOWER when suspend/resume
2019-03-31 23:57:38 +07:00
hathach
eabfc53f38
added tud_suspended() and tud_ready()
2019-03-30 23:01:23 +07:00
hathach
b28cc6ddb1
added dcd_remote_wakeup() stub for all ports
2019-03-30 14:47:11 +07:00
hathach
93a853cd5b
usbd add connected, suspended, remote_wakeup
...
- remove use of osal_queue_reset
2019-03-30 02:26:15 +07:00
hathach
1c2beba85c
working on suspend and resume
...
change dcd_init signature
2019-03-29 16:23:00 +07:00
hathach
0bdd4bd550
added Suspend and Resume event for nrf5x port
...
also rename DCD_EVENT_SUSPENDED to DCD_EVENT_SUSPEND
2019-03-29 01:34:53 +07:00
hathach
1e9848d917
replace dcd_edpt_(clear)stall by usbd_edpt_(clear)stall
...
- remove dcd_edpt_stalled() from dcd porting
2019-03-27 16:09:49 +07:00
hathach
4722376654
remove dcd_get_frame_number()
2019-03-27 01:01:48 +07:00
hathach
18f248b142
remove tusb_hal_millis() usage, less work for porting
2019-03-24 01:19:32 +07:00
hathach
43eb1a8b16
added stub for dcd_stm32f3
2019-03-22 23:57:56 +07:00
hathach
ba1bea5d53
simplify board API, adding stm32f3 discovery
...
- remove board header since it is not used
2019-03-22 22:06:48 +07:00
hathach
da55610f43
clean up
2019-03-20 20:19:21 +07:00
hathach
c211ee19dd
migrate license from BSD 3 clause to MIT
2019-03-20 16:11:42 +07:00
hathach
f932cf3854
stm32 update fifo in comment
2019-03-17 15:16:52 +07:00
hathach
5e92d67015
stm32 update TX Fifo for edpt IN, both CDC + MSC work great
...
- call dcd_event_xfer_complete() when enough bytes received
- add dcd_get_frame_number()
2019-03-15 18:43:09 +07:00
hathach
eda56769b9
dcd_set_address include status response, usbd control stall both control in and out
2019-03-13 23:14:48 +07:00
hathach
195a44172a
update stm32 dcd stall control endpoint
2019-03-13 16:54:10 +07:00
hathach
8418cb816b
Merge branch 'master' into stm32f4
2019-03-05 05:45:42 -08:00
William D. Jones
c95ad426c6
stm32f4: Refactor IN and OUT endpoint interrupt handling into their own functions.
2019-02-27 11:01:08 -05:00
William D. Jones
f43161353c
stm32f4: Refactor RX FIFO read into its own function; remove RXFLVL
...
resetting (read only) and masking (no nested ints).
2019-02-27 10:39:37 -05:00
William D. Jones
c51b11f103
Move all paths using "stm" to "st" subdirectories, update config.mk.
2019-02-27 09:15:07 -05:00
William D. Jones
5a1c5cf0b7
stm32f4: Clarify comments and disable OTGINT; fixes stack reset on
...
cable disconnect, and we don't use OTG right now.
2019-02-14 23:41:16 -05:00
William D. Jones
5a34a9de69
stm32f4: Implement STALL logic for endpoints.
2019-02-08 16:46:12 -05:00
William D. Jones
5526d840a8
stm32f4: Do some comment/dead code (per 6048a3b
) cleanups.
2019-02-08 12:05:44 -05:00
William D. Jones
c7a52829f4
Clarify receive_packet comment, add SOF handling.
2019-02-08 11:51:29 -05:00
William D. Jones
5645d44127
stm32f4: Add for-loop guard for transmit_packet xfers < 4 chars.
2019-02-07 21:25:27 -05:00
William D. Jones
28ccc8bd0b
stm32f4: Fix bad implementation of receive_packet function.
2019-02-07 21:23:00 -05:00
William D. Jones
b819b33a68
stm32f4: Make sure interrupts enabled for non-zero endpoints.
2019-02-07 20:29:48 -05:00
William D. Jones
4dc6746a68
stm32f4: Implement dcd_edpt_busy. Don't set EPENA for activated endpoints.
2019-02-05 13:22:39 -05:00
William D. Jones
747815f03b
stm32f4: Ensure endpoints enabled properly, using correct FIFOs.
2019-02-04 20:30:47 -05:00
William D. Jones
f5d9e7e560
stm32f4: Implement dcd_edpt_open.
2019-01-30 09:27:27 -05:00
William D. Jones
7aadaa3ef2
stm32f4: Handle only one setup packet at a time as a workaround. Device
...
enumerates.
2019-01-30 05:28:48 -05:00
William D. Jones
a9e188a3d2
stm32f4: Implement dcd_set_address.
2019-01-30 02:48:49 -05:00
William D. Jones
fcabc717d1
Small cleanups (remove inaccurate comment, set EP0 max size based on speed).
2019-01-30 02:03:19 -05:00
William D. Jones
8629f0c108
Properly schedule OUT xfers on a packet basis.
2019-01-30 02:01:09 -05:00
William D. Jones
6918db3639
stm32f4: Add receive packet function.
2019-01-30 01:42:17 -05:00
William D. Jones
9ce29f5ee6
stm32f4: Refactor packet transmit into subroutine.
2019-01-30 00:49:00 -05:00
hathach
1a84f5da54
nrf5x Let application decide USBD_IRQn priority
2019-01-29 19:42:31 +07:00
hathach
777f41a066
clean up
2019-01-29 18:47:29 +07:00
William D. Jones
9e76635465
stm32f4: Clarify required FIFO sizes and observed behavior.
2019-01-24 04:18:53 -05:00
William D. Jones
fe7f304ad4
stm32f4: Start adding OUT interrupt handling, fix buffer sizes; RXFIFO
...
too low for some reason, TXFIFO EP0 used wrong bitmask.
2019-01-24 03:06:57 -05:00
hathach
bd53256126
fix #32
2019-01-23 19:06:37 +07:00
William D. Jones
01117fb965
stm32f4: Finish dcd_edpt_xfer implementation (OUT xfers not functional yet).
2019-01-23 03:31:44 -05:00
William D. Jones
b41f610514
stm32f4: Remember to turn off TXFE when IN xfer is done; it not
...
automatically cleared like EPENA.
2019-01-23 02:24:29 -05:00
William D. Jones
836d13fc4b
stm32f4: Fix FIFO write logic (requires 32 bit writes).
2019-01-23 02:06:07 -05:00
William D. Jones
aa9a7e882c
stm32f4: Properly set control endpoint max packet size.
2019-01-23 00:55:45 -05:00
William D. Jones
17e418bce4
stm32f4: Fix incorrect xfer length for short packet IN xfers.
2019-01-23 00:44:55 -05:00
William D. Jones
d1150432fe
stm32f4: Remove assumption that EP 0 is only control endpoint.
2019-01-23 00:12:33 -05:00
William D. Jones
51c0ce3f6b
stm32f4: Implement interrupt handling for IN packets (first signs of life).
2019-01-22 23:51:58 -05:00
William D. Jones
43c890615a
stm32f4: Start implementing dcd_edpt_xfer.
2019-01-22 00:42:43 -05:00
William D. Jones
69f5f18fd6
stm32f4: Remove some template commented code.
2019-01-21 23:45:40 -05:00
William D. Jones
71e1b9d045
stm32f4: Setup packet events in tinyusb now functional.
2019-01-19 21:12:20 -05:00
William D. Jones
5720aef7bb
stm32f4: Implement setup packing receive, fix typo in FIFO receive size.
2019-01-19 20:03:18 -05:00
William D. Jones
06c15bf913
stm32f4: Complete initialization for EP0 (packet handling not implemented).
2019-01-19 17:56:53 -05:00
William D. Jones
657d3e2983
stm32f4: Enable USB peripheral, fix typos in register writes.
2019-01-13 18:36:18 -05:00
William D. Jones
03cbd406cb
dcd_stm32f4: Add USB init skeleton based on manual (does not enumerate).
2019-01-11 19:53:24 -05:00
William D. Jones
0f9fa5956f
bsp.board_stm32f407g_disc1: Switch to external oscillator (more precise).
2019-01-11 13:47:44 -05:00