Commit Graph

1592 Commits

Author SHA1 Message Date
hathach f4845e4e6c
minor comment 2023-08-16 14:43:58 +07:00
hathach b3c7fe1023
clear qhd halted bit if not caused by STALL protocol, allow for next transfer 2023-08-16 11:12:00 +07:00
Ha Thach 04f0cd5c80
Merge pull request #2209 from HiFiPhile/hitl
Enhance HITL test
2023-08-09 20:20:46 +07:00
hathach b8b01c1075
update to dcd ip3511 to add work-around for lpc54628 usb hs errata USB.1 and USB.2
msc is mounted, but device couldn't work reliably and got constant reset
due to other errata probably.
2023-08-09 12:47:24 +07:00
hathach 4938971aad
code format 2023-08-07 20:48:09 +07:00
hathach 1f95a417f2
Add tuh_rhport_is_active() and tuh_rhport_reset_bus()
- also improve ehci bus reset
- seperate bus reset delay and contact debouncing delay in enumeration
2023-08-07 20:48:07 +07:00
Aladdin Bakosh 56e52037a8 clean(ra_hcd): fix typos in the hcd library 2023-08-04 12:00:25 +02:00
Ha Thach 1b04db2a77
Merge branch 'master' into master 2023-08-04 11:48:04 +07:00
hathach ef5bd9ee6c
Merge branch 'master' into enhance-bsp 2023-08-04 00:31:12 +07:00
hathach a160da1f2b
add lpc43 family 2023-08-03 17:19:47 +07:00
Martino Facchin edee46e794 renesas: host: remove attach_attempt logic 2023-08-01 15:21:31 +02:00
hathach f04e5108b2
Merge branch 'arduino-renesas_ra_hs_rebased' into renesas_ra_hs_rebased 2023-08-01 17:08:03 +07:00
hathach 04f1a34c39
add rusb2_common.c for dynami irq 2023-08-01 17:03:07 +07:00
Martino Facchin 965627e81c rusb2: move dynamic irq function to c file 2023-08-01 11:41:33 +02:00
hathach 3f788a4e5a
enable USBMC for uno r4, add board_init_after_tusb() API
add BOARD_UPPERCASE for board detection
2023-07-31 19:09:40 +07:00
hathach 0d9973ef87
enable_irq since uno bootloader can disable it. systick triggered, however usb still not work with uno 2023-07-31 16:21:19 +07:00
hathach feb58ebd54
add uno r4 wih FLASH_IMAGE_START=0x4000, running but interrupt (systick) does not seems to work 2023-07-28 19:01:12 +07:00
hathach e56d5443a8
- revert usb address
- more clean up
2023-07-28 12:42:40 +07:00
hathach 6021803d58
fix ci 2023-07-28 11:33:26 +07:00
hathach ec093bebad
Merge branch 'master' into renesas_ra_hs_rebased 2023-07-27 16:50:34 +07:00
Ha Thach db59494b1b
Merge pull request #2179 from hathach/enhance-ehci
Enhance EHCI
2023-07-27 16:15:43 +07:00
hathach 5a29db2787
add check for edpt_xfer() with halted, also reset data toggle when clear stall 2023-07-27 15:52:55 +07:00
hathach 10575c1b38
mising ehci 2023-07-26 20:48:18 +07:00
hathach c37a957174
correct hcd_edpt_clear_stall() API signature 2023-07-26 19:56:48 +07:00
hathach 6b6dcc6c09
refactored multiple ports for hcd rusb2 2023-07-26 19:52:33 +07:00
hathach fbaa148fe0
updating hcd rusb2
- make osal_task_delay() as weak function in usbh
- implement osal_task_delay() in hcd rusb2 (may moved to other places)
2023-07-26 18:55:41 +07:00
hathach 4deea87579
improve processing usb complete and error isr.
also merge them together
2023-07-25 15:07:21 +07:00
hathach ef69da054e
use standard EHCI USB INT instead of chipidea async/period interrupt to be compatible with other EHCI implementation 2023-07-25 12:03:54 +07:00
Ha Thach fda92fd34a
Merge branch 'master' into hcd-abort-xfer 2023-07-24 21:38:46 +07:00
Ha Thach 0b38941362
Merge pull request #2173 from hathach/imxrt-dcache-align
change dcache clean/invalidate return type to bool
2023-07-24 21:36:15 +07:00
hathach f295aaf185
add hcd abort xfer for rp2040 pio usb 2023-07-24 20:58:50 +07:00
hathach d254256047
change dcache clean/invalidate return type to bool
add tu_assert() check for aligned 32byte address for imxrt
2023-07-24 17:54:24 +07:00
hathach 14a7379799
fix ohci warnings, and add freertosconfig for lpc4088 2023-07-24 16:54:02 +07:00
hathach ef49b93532
rename CFG_TUSB_MEM_SECTION to CFG_TUD_MEM_SECTION in device stack
CFG_TUD_MEM_SECTION is default to CFG_TUSB_MEM_SECTION
2023-07-24 15:46:21 +07:00
emb4fun e2f28bc134
Added support for the NXP K64 series 2023-07-23 10:53:22 +02:00
hathach c122e9df73
implement hcd_edpt_abort_xfer() for EHCI, also move thing around a bit 2023-07-21 19:06:36 +07:00
hathach 14c98dd863
minor ehci rename, move code around 2023-07-21 16:39:30 +07:00
hathach 0da273ea79
add stub hcd_edpt_abort_xfer() for all ports 2023-07-21 12:52:26 +07:00
hathach 1cc7c5d030
add hcd_edpt_abort_xfer() API 2023-07-21 12:43:48 +07:00
Ha Thach 2bab947e38
Merge pull request #2146 from tannewt/host_cache_align
Fix host buffer alignment setting
2023-07-18 16:39:48 +07:00
hathach b56c4fe945
Merge branch 'master' into renesas_ra_hs_rebased 2023-07-18 15:13:58 +07:00
Aladdin Bakosh 3230d5b1ea debugging can be configured on renesas dcd 2023-07-17 11:54:09 +02:00
Aladdin Bakosh 41b608562a debugging can be configured on renesas hcd 2023-07-17 11:54:09 +02:00
Aladdin Bakosh 1923b1845d fix(RA_hcd): STALL status can be also 3 not only 2 2023-07-17 11:54:09 +02:00
Scott Shawcroft 8b6d0a166b
Fix host buffer alignment setting 2023-07-14 15:30:22 -07:00
hathach 0f53e746ff move check highspeed to rusb_ra 2023-07-07 18:41:16 +07:00
hathach 88478a9d05
add PORT selection for makefile 2023-07-07 16:24:22 +07:00
hathach e0f1ba8b0e
fully work with multiple ports without CFG_TUSB_RHPORT0/1 2023-07-07 16:07:11 +07:00
hathach 4c156100fa
use unaligned access read for hw fifo 2023-07-07 12:27:18 +07:00
hathach c53acb1455
fix build with rx 2023-07-06 20:10:58 +07:00
hathach 1eefc2b3ef
more multiple ports update 2023-07-06 19:35:42 +07:00
hathach 95b77a0e73
add rusb2_module_start(), more update for multiple ports for dcd rusb2 2023-07-06 15:54:07 +07:00
hathach f308435b64
update ra type to include usbhs registers 2023-07-06 09:34:33 +07:00
hathach 4f4c93594d
minor pipe clean up 2023-07-05 17:51:36 +07:00
hathach f79529c09c
usb hs work with ra 6m5 ek 2023-07-05 17:13:01 +07:00
hathach 04b1a67898
Merge branch 'master' into renesas_ra_hs_rebased 2023-07-03 13:09:43 +07:00
Lars Pötter 2029ca9536 also fixed pico_trac() log messages. 2023-07-02 10:53:08 +02:00
Lars Pötter 0693462eba made line ends consistent. 2023-07-02 09:02:24 +02:00
hathach e7431f54f2
fix undef with fsp 2023-07-01 17:46:21 +07:00
hathach 99e75e6a8a
rework ra build 2023-07-01 12:41:12 +07:00
hathach 6284f2d722
add hcd_frame_number() for pio-usb host 2023-06-29 18:58:33 +07:00
hathach 3cfb838ba7
fix warnings when enable rtt with rp2040 2023-06-26 17:03:45 +07:00
hathach e754795d3a
fix build warnings 2023-06-16 15:29:34 +07:00
hathach a7f330fa94
fix build, update freertos config for cmake 2023-06-16 14:17:25 +07:00
hathach 65d6acdbfa
fix build warnings 2023-06-16 12:02:42 +07:00
hathach 8af8869d3b
renam OPT_MCU_MIMXRT to OPT_MCU_MIMXRT1XXX
fix build util with makefile
2023-06-16 11:26:38 +07:00
hathach 96f7cd09dc
remove legacy transdimension driver 2023-06-16 10:45:59 +07:00
hathach d70403f1f4
refactor khci to chipidea fs driver for device (host is not yet) 2023-06-15 13:06:27 +07:00
Ha Thach bbc76e7777
Merge pull request #2104 from hathach/g4-pd
Initial support for USB PD stack
2023-06-12 23:14:48 +07:00
hathach c28503060c
ad pd_types.h 2023-06-12 14:57:50 +07:00
hathach debde4cc97
response with request safe5v, get passed PS_READY 2023-06-12 12:14:55 +07:00
hathach 912802456b
move protocol message to stack, disable battery in PWR's CR3
there is still issue with CC1/CC2 pull down resistor and vstate is not
correct.
2023-06-09 18:15:28 +07:00
hathach 8181d470e5
enable DMA for both pd rx, tx 2023-06-08 18:55:54 +07:00
hathach 9c2a8490af
dma rx works well 2023-06-08 13:37:37 +07:00
hathach 9b7dee563e
able to response with good crc 2023-06-07 18:57:48 +07:00
Aladdin Bakosh 8bb012e50b fix(RA): static assert RUSB2 register 2023-06-07 12:01:59 +02:00
hathach b893f1d541
inital support for usb typec and pd example 2023-06-07 15:10:40 +07:00
Martino Facchin 2b735ee8f5 renesas_ra: fix wrong ifdef
Since CFG_TUSB_RHPORT1_MODE is always defined now for backwards compatibility
2023-06-05 09:48:06 +02:00
Martino Facchin cdbd3a0b4e Merge remote-tracking branch 'mainline/master' into HEAD
Update fsp to 4.0.0
2023-06-05 09:12:50 +02:00
Martino Facchin cdae66c837 renesas_rx: fix compilation on latest GCC
__CCRX__ only applyes to version 4 of RX family compiler http://tool-support.renesas.com/autoupdate/support/onlinehelp/csp/V4.01.00/CS+.chm/Compiler-CCRX.chm/Output/ccrx04c0201y.html

__RX__ is one of the macros exported by latest gcc (gcc_8.3.0.202305_rx_elf)
2023-06-05 09:04:55 +02:00
Aladdin Bakosh 268ab5863a fix(RA Host Portable): git rid of the IAR warnings for packed 2023-06-02 14:14:57 +02:00
hathach af59864ab5
Merge branch 'master' into feature/STM32G0 2023-06-01 13:28:28 +07:00
Ha Thach eedafb23f7
Merge pull request #2063 from abakosh/develop
fix(RA Host Portable): implement missing function __builtin_ctz(x)
2023-05-24 20:11:50 +07:00
Aladdin Bakosh 57d2eb603b fix(RA Host Portable): implement missing function __builtin_ctz(x) for IAR 2023-05-24 11:38:40 +02:00
Ha Thach 1ef820ecfe
Enhance chipidea (#2075)
* update chipidea dcd, remove manual ep_count and use DCCPARAMS to get number of endpoint instead
* add dcd dcache for chipidea
* add cmake for lpc18
* add makefile build for mcx
* use fork of mcu sdk
* fix ci build with nrf
* flash rp2040 with openocd
2023-05-23 21:45:00 +07:00
hathach 7211dd18b4
more dcache fix 2023-05-19 13:42:26 +07:00
hathach 5dae5e1292
ehci fix dcache clean when control endpoint failed 2023-05-19 13:32:49 +07:00
hathach f26a93908e
only clean/invalidate dcache on imxrt if memory is not in DTCM 2023-05-19 10:56:52 +07:00
hathach ec4bd39a92
refactor ehci: add attached_buffer for dcache invalidate for IN transfer 2023-05-18 16:41:06 +07:00
hathach 27acaa013b
refactor ehci, since usbh only queue 1 TD per queue head 2023-05-18 15:44:08 +07:00
hathach 49e2aabc81
EHCI more improvement
- more dcache clean/invalidate
- extract init_periodic_list()
- improve isr list handling
2023-05-18 13:45:38 +07:00
hathach a0aea52a11
more cache, fix an similar issue with OHCI when removing an queue head 2023-05-18 12:39:53 +07:00
hathach e4f4ad5bc3
use weak local for dcache function to skip if() 2023-05-18 10:21:11 +07:00
hathach a3e017bfd2
EHCI adding dcahe support, passing enumertaion 2023-05-18 10:04:48 +07:00
Martino Facchin 32f9f452af renesas: provide default for CFG_TUSB_RHPORT1_MODE
Should fix CI failure for Renesas RX family
2023-05-17 12:13:28 +02:00
hathach eb89df4115
adding hcd_dcache_clean/hcd_dcache_invalidate 2023-05-17 16:14:35 +07:00
hathach a9aa0e3a1a
fix error on EHCI causes xfer error in non-queued qhd which cause memory fault 2023-05-16 11:10:44 +07:00
hathach 1e998ce3bd
usbd: fix control transfer issue for chipidea hs when previous status and new setup complete in the same isr frame
change usbd edpt busy/stalled/claimed value to 0/1 instead of
(true/false) since they are 1-bit field.
2023-05-16 11:09:23 +07:00
hathach 1c4f22a54c
EHCI: fix xfer failed with disconnected device as stalled
- change CFG_TUH_ENDPOINT_MAX to 16 (max endpoint pair per device) if
not defined
- change QHD_MAX for EHCI, should be user configurable and more
optimized in the future
2023-05-16 11:09:22 +07:00
hathach 206d63e038
correct EHCI reporting failed xfer (instead of stalled) when device is unplugged 2023-05-16 11:09:21 +07:00
hathach c0e4c02b9d allow imxrt build with dual exmaples 2023-05-10 11:15:11 +07:00
hathach 77f0726361 fix ehci issue with portsc when enable port power and port reset
fix attached device not regconized if attached before power on
2023-05-09 17:32:14 +07:00
Martino Facchin 6ff62c0fe8 renesas: add fallback for targets not defining CFG_TUSB_RHPORT*_MODE 2023-05-03 11:47:41 +02:00
Martino Facchin 5f7e7b4b0a renesas_ra: support RA2A1 (FS only) 2023-05-03 10:06:13 +02:00
Martino Facchin 4afed62646 renesas_ra: host: handle retry on attach() 2023-05-03 10:05:29 +02:00
Martino Facchin be54870c3b renesas_ra: add support for HS port 2023-05-03 10:02:24 +02:00
Ha Thach 964e7ebf21
Merge pull request #2013 from tannewt/imx_1042
Handle iMX RT 1042 usb naming
2023-04-24 16:53:24 +07:00
Jacek Fedorynski 9bf97e3e52 [rp2040] Make writes to SIE_CTRL aware of concurrent access
This commit makes it so that when setting the START_TRANS bit in the
SIE_CTRL register, along with some other bits, we first set all the
other bits, then wait some cycles, and then set the START_TRANS bit.

Doing so protects against a situation where the USB controller is
reading the register at the same time and gets an incorrect value.

This mirrors the procedure already applied to buffer control
registers.
2023-04-20 20:23:31 +02:00
Mengsk 412b557a08 Cleanup unnecessary code for 16bit access. 2023-04-17 15:34:20 +02:00
HiFiPhile 818bda18c2 Fix FIFO transfer and buffer alignment. 2023-04-14 23:37:07 +02:00
HiFiPhile 2f2c8ce9ec Fix GCC build. 2023-04-14 21:00:55 +02:00
HiFiPhile 413b0a7da5 Use PLL clock. 2023-04-14 17:12:47 +02:00
HiFiPhile cbf4b1aec8 Merge branch 'master' of https://github.com/hathach/tinyusb into pr1942 2023-04-14 13:16:52 +02:00
Scott Shawcroft 2cda9b60c9
Handle iMX RT 1042 usb naming 2023-04-06 15:45:23 -07:00
John Cronin 718bcdb8bc Add STM32L5 support - no OTG similar to some L4s 2023-04-03 13:56:16 +01:00
hathach 71fb6469d4 separate CFG_TUSB_MEM_SECTION and CFG_TUSB_MEM_ALIGN to
- CFG_TUD_MEM_SECTION and CFG_TUD_MEM_ALIGN
- CFG_TUH_MEM_SECTION and CFG_TUH_MEM_ALIGN
- fix missing mem section and align for host
2023-03-24 14:05:21 +07:00
hathach 4520218786
more compatible with IAR 2023-03-20 11:33:39 +07:00
hathach 1fc203b085
more update to kinetis bsp 2023-03-18 19:50:24 +07:00
hathach 2d187777c0
merge kinetis into its own family in bsp 2023-03-18 18:30:51 +07:00
Bob Paddock f9b8a0667a Add support for NXP FRDM_K32L2A4S eval board. 2023-03-18 16:50:50 +07:00
hathach 9f54cc1eb7
more clean up 2023-03-18 11:43:47 +07:00
hathach bdfcd50b1b
Merge branch 'master' into portability 2023-03-17 23:53:38 +07:00
hathach 3623ba1884
fix trailing space and new line
temporarily disable codespell
2023-03-17 16:12:49 +07:00
hathach e7d212f337
more fix 2023-03-16 23:21:15 +07:00
hathach 92aed7e3e0
rename symbols 2023-03-16 11:28:10 +07:00
hathach bc2127b330
rename file link to rusb2 2023-03-16 11:03:53 +07:00
hathach cd1726c009 Merge branch 'master' into renesas-ra 2023-03-16 09:51:27 +07:00
hathach d9a9dc5ac0 fix PICO_SHARED_IRQ_HANDLER_HIGHEST_ORDER_PRIORITY not defined in old pico-sdk 2023-03-15 17:38:14 +07:00
Ha Thach ea8ecea59a
Merge pull request #1953 from tannewt/fix_cached_imx_reset
Flush the dcd data on reset
2023-03-14 09:08:32 +07:00
Scott Shawcroft d31aac453e
Flush the dcd data on reset 2023-03-13 15:22:00 -07:00
Hubert Denkmair f8a21fff17 dcd_write_packet_memory: use volatile modifier for destination pointer 2023-03-12 15:51:07 +01:00
hathach 0a7c08d16e minor format 2023-03-12 16:01:24 +07:00
Ha Thach be21413361
Merge pull request #1948 from dhalbert/remove-volatile-cast-include
rp2040: include hardware/sync.h explicitly
2023-03-11 09:35:04 +07:00
hathach fe77976765 Merge branch 'master' into renesas-ra 2023-03-11 08:15:23 +07:00
Dan Halbert 4857abdc6b rp2040: include hardware/sync.h explicitly 2023-03-10 14:01:51 -05:00
Jerzy Kasenberg f0ddf8d10f dcd_nrf5x: ISO OUT handling
For incoming ISO OUT packets it was possible to start
DMA from endpoint to RAM before transfer was started
resulting in unrelated memory corruption.
This is scenario that causes memory corruption:
- ISO OUT packet is received
- Packet is transferred by DMA to transfer buffer
- xfer->started is cleared and xfer->buffer is updated as
  it is in every case
- Application takes to long to handle it (it happens when debugger
  is connected breakpoint is hit slowing down software).
- Next ISO OUT packet arrives
At this point there was no check if transfer was started and packet
was copied by DMA to location beyond previous data, possibly overwriting
unrelated memory.

This solves the issue by checking that transfer was
started and there is buffer ready for incoming packet.
2023-03-10 08:22:43 +01:00
hathach 0f8e530de1
fix incorrect merge of hcd link 2023-03-08 23:01:37 +07:00
hathach 2cf092464b
fix freertos build with iar, format/indent link_type 2023-03-08 22:34:54 +07:00
hathach 05e0205ad0
Merge branch 'master' into renesas-ra 2023-03-08 21:05:06 +07:00
Hubert Denkmair b3ad560e62 fix path to stm32g0xx.h 2023-03-08 14:22:11 +01:00
Hubert Denkmair 410ad4d0f9 add basic STM32G0 support 2023-03-08 12:05:58 +01:00
graham sanderson b7fa90e706 rp2040: Fixup lib and example compile for LLVM Embedded Toolchain for ARM 2023-03-02 14:32:22 -06:00
hathach 5d3084a714 add TUP_USBIP_FSDEV and TUP_USBIP_FSDEV_STM32, clean up ifdef with stm32 2023-03-01 11:22:04 +07:00
Ha Thach 3c38c7dc25
Merge pull request #1828 from HiFiPhile/stm32_fsdev
stm32_fsdev & ISO EP buffer allocation improvements
2023-02-28 23:45:02 +07:00
hathach ffdc100cb9 rename ep_num to ep_idx, minor clean up 2023-02-28 17:11:59 +07:00
Gunar Schorcht 4c510c12b1 synopsys/dwc2: fix SOF interrupt handling
SOF is not a flag of the GOTGINT register but of the GINTSTS register. Therefore the flag must be written in the GINTSTS register instead of the GOTGINT register to clear the interrupt.
2023-02-27 09:54:45 +01:00
hathach eca96c635d
comment out osal_task_delay if using os none 2023-02-22 22:28:22 +07:00
hathach 1466afafeb
move and add optional tusb_app_virt_to_phys/tusb_app_phys_to_virt
also add place holder for tusb_app_dcache_flush() and
tusb_app_dcache_invalidate()
2023-02-22 22:14:50 +07:00
hathach 4c846af53e
rename OHCI_RHPORTS to TUP_OHCI_RHPORTS 2023-02-22 16:18:45 +07:00
wooyay 4e2afdf5e1 ohci: Disable MIE interrupt during IRQ processing, zero HccADoneHead on completion 2023-02-18 10:48:39 +10:30
Ryzee119 75f6583c1c ohci: Use enum instead of magic number 2023-02-18 10:48:39 +10:30
Ryan Wendland f2a6af05b1 ohci: Add ability to separate physical and virtual memory 2023-02-18 10:48:38 +10:30
Ryan Wendland f87262185e ohci: Set skip on ed prior to removal 2023-02-18 10:24:21 +10:30
Ryan Wendland cc9c3feeae ohci: Fix bug in ed removal 2023-02-18 10:24:21 +10:30
Ryzee119 e89e8ba392 ohci: Direct port commands to the correct rhport. 2023-02-18 10:24:21 +10:30
Ryzee119 5d3c0fb922 ohci: Force reset of devices already connected on power up 2023-02-18 10:24:21 +10:30
Ryzee119 c1d0fd1bd7 ohci: Wait POTG time after port power 2023-02-18 10:24:21 +10:30
Ryzee119 2063ee5f15 ohci: Toggle frameinterval bit on update 2023-02-18 10:24:21 +10:30
Ryzee119 d5e6d02817 ohci: Leave SMM or bios mode during init 2023-02-18 10:24:21 +10:30
Ryzee119 c820c87692 ohci: Support configurable number of roothub ports 2023-02-18 10:24:21 +10:30
Ryzee119 d367e8f8a8 ohci: Expand roothub descriptors into unions 2023-02-18 10:24:21 +10:30
Ha Thach 49628d8c18
Merge pull request #1779 from P33M/rp2040_device_babble_fix
rp2040: avoid device-mode state machine hang
2023-01-31 21:38:27 +07:00
hathach ddb061f639 fix typos 2023-01-31 19:03:31 +07:00
hathach 6759721e9a move errata to end of c file 2023-01-31 17:38:27 +07:00
hathach 19b6cbc616 add e15 prefix or walkaround related functions, also minor refactor 2023-01-31 17:15:42 +07:00
hathach 0cce42fcc6 minor clean up 2023-01-31 11:38:15 +07:00
hathach 6dd40603f9 fix typo 2023-01-30 11:46:52 +07:00
Ha Thach 88f3279c3c
Merge branch 'master' into port-ft90x 2023-01-30 11:40:53 +07:00
Jonathan Bell 0d2078d295 rp2040: shuffle hw_endpoint members
Ordering by element size prevents alignment holes, and as a consequence the
host mode version of the struct is the same size as device, as pad bytes at
the end are used instead.
2023-01-24 12:05:32 +00:00
Jonathan Bell 73b0047efc rp2040: avoid device-mode state machine hang
Don't mark IN buffers as available during the last 200us of a full-speed
frame. This avoids a situation seen with the USB2.0 hub on a Raspberry
Pi 4 where a late IN token before the next full-speed SOF can cause port
babble and a corrupt ACK packet. The nature of the data corruption has a
chance to cause device lockup.

Use the next SOF to mark delayed buffers as available. This reduces
available Bulk IN bandwidth by approximately 20%, and requires that the
SOF interrupt is enabled while these transfers are ongoing.

Inherit the top-level enable from the corresponding Pico-SDK flag.
Applications that will not use the device in a situation where it could
be plugged into a Pi 4 or Pi 400 (for example, when directly connected
to a commodity hub or other host) can turn off the flag in the SDK.

v2: use a field in hw_endpoint to mark pending.

v3: Partial rewrite following review comments

- Stub functions out if the workaround is not required
- Only force-enable SOF while any vulnerable endpoints are active
- Respect dcd_sof_enable() functionality
- Get rid of all but necessary ifdef hackery
- Fix a bug where the "endpoint lock" was used with an uninitialised pointer.
2023-01-24 11:53:28 +00:00
Jonathan Bell c3e47c31cc rp2040: export hw_endpoint_start_next_buffer() and hw_endpoint_lock_update()
The next change to the driver requires the export of these functions. Leave the
lock unimplemented for now.

Also move hw_set and hw_clear aliases into the top-level header file.
2023-01-23 10:55:20 +00:00
Ha Thach ea098aeda1
Merge pull request #1847 from HiFiPhile/dwc2_iar
dwc2: fix iar warnings
2023-01-18 17:41:33 +07:00
Ha Thach fa9d19027b
Merge pull request #1405 from gregdavill/ch32v307
Add WCH CH32V307 port
2023-01-12 17:51:56 +07:00
hathach 3cf21c66b6 add dcd_remote_wakeup() stub 2023-01-12 15:26:48 +07:00
hathach e61d4aefe6 rename driver with dcd_ to be consitent with other ports 2023-01-12 12:08:56 +07:00
hathach 3cc6cece07 add note for openocd with wch, also add wch-riscv.cfg 2023-01-12 10:25:48 +07:00
MasterPhi 9d19ed940e dwc2: fix IAR warnings. 2023-01-11 18:50:38 +01:00
Ha Thach 8775d55adc
Merge pull request #1843 from HiFiPhile/ip3511
ip3511 : Fix IAR build.
2023-01-09 10:02:59 +07:00
MasterPhi 57de6016f9 ip3511 : Fix IAR build. 2023-01-08 11:23:18 +01:00
Ha Thach 949950e592
Merge branch 'master' into ch32v307 2023-01-07 23:46:46 +07:00
Mengsk 8db462bf6e Add fix to dcd_edpt_iso_activate() 2023-01-05 16:54:42 +01:00
Simon Kueppers d6b612257e Fixed bug where with some devices, the TU_ASSERT inserted with this commit gets triggered for ISOCHRONOUS endpoints. It is necessary for those endpoints to set the NUM_BLOCK and BLSIZE for the receiving buffer in both, USB_COUNTn_TX and USB_COUNTn_RX. Despite the datasheet showing those fields only for the USB_COUNTn_RX register 2023-01-05 16:23:53 +01:00
pete-pjb f5cffeedec Fix typo in audio.h. Specifiy _ctrl_xfer struct in CFG_TUSB_MEM_SECTION
Add NULL check to loop in list_remove_qhd_by_addr() function in ehci.c
2023-01-03 10:33:36 +00:00
Mengsk 69475cd1bf Remove tu_stm32_sof_cb 2023-01-02 12:06:26 +01:00
Mengsk 7228239eb9 Clean up. 2023-01-02 09:43:48 +01:00
Mengsk fc32280f42 Fix buffer allocation overflow. 2022-12-30 15:10:00 +01:00
Mengsk 21bdafcfef Add ISO buffer allocation. 2022-12-30 01:08:04 +01:00
Mengsk 07ad64adfe Do not set USB_EP_RX_NAK for ISO EP. 2022-12-29 23:30:24 +01:00
Mengsk 0bd41d5354 Fix CI. 2022-12-29 21:37:44 +01:00
Mengsk fe8c170c98 Add dcd_edpt_iso_alloc() / dcd_edpt_iso_activate() for ISO EP buffer management. 2022-12-29 19:19:27 +01:00
Mengsk cece59df22 Generally enable ISO xfer. 2022-12-29 12:33:44 +01:00
Mengsk ef2f17a514 Add hardware endpoint allocator. 2022-12-29 12:33:43 +01:00
Mengsk b156a8b78c dcd_stm32_fsdev : Implement FIFO transfer correctly. 2022-12-29 12:33:43 +01:00
Mengsk 17990025bb dcd_stm32_fsdev : Fix index out of bound in dcd_write_packet_memory()
If src is odd then src[wNBytes] is accessed.
2022-12-29 12:33:43 +01:00
Simon Kueppers 1d37f5ef9b Added improvements with regards to SOF timing jitter 2022-12-29 12:33:16 +01:00
Simon Kueppers 76413a95d4 Added TU_ATTR_ALWAYS_INLINE to all static inline functions 2022-12-29 12:29:47 +01:00
Simon Kueppers 9ec21248d7 Fixed various small problems and inaccuracies regarding ISOCHRONOUS endpoint 2022-12-29 12:29:47 +01:00
Mengsk b4b619abd6 SHA-1: 5cb3ed518301e2237ee4e468e97e51ece0ba3838
* Correct handling of SOF interrupt
2022-12-29 12:29:28 +01:00
Mengsk 8327090171 Merge branch 'master' of https://github.com/hathach/tinyusb into stm32_fsdev 2022-12-29 12:14:52 +01:00
Simon Kueppers d584b07e2c Fixed problem where the transmit byte count was written into the wrong register on ISOCHRONOUS endpoints 2022-12-29 12:13:56 +01:00