Commit Graph

3309 Commits

Author SHA1 Message Date
Ha Thach a91b720c2e
Merge pull request #2291 from hathach/minor-update-max3421
minor update for max3421
2023-10-30 11:10:03 +07:00
hathach 9cba9a753b
update s3 devkitm with max3421 pin following metro s3, check max3421 version to make sure it is valid 2023-10-27 17:40:53 +07:00
HiFiPhile 2d802e03e9 Update audio_4_channel_mic example for HS device. 2023-10-24 22:14:24 +02:00
PanRe a2390802f8
Merge pull request #2282 from HiFiPhile/uac_interl
UAC IN transfer improvements
2023-10-19 19:49:19 +02:00
Mengsk d3fa3cdf48 Adjsut blackout time. 2023-10-18 17:05:35 +02:00
hathach 27a2c8cba4
adding nulceo stm32u5a5, fix clock configure issue
dwc2 core stuck at reset
2023-10-18 18:43:07 +07:00
Ha Thach dd588222c7
Merge pull request #2265 from bencowperthwaite/master
STM32U5 HS Support
2023-10-18 15:25:57 +07:00
HiFiPhile ade8a19aef Put sw_buf in USB section only if necessary. 2023-10-17 21:21:52 +02:00
HiFiPhile e9d894fe66 Fix compile. 2023-10-17 21:03:29 +02:00
HiFiPhile d83a210788 Add blackout time. 2023-10-17 15:18:05 +02:00
HiFiPhile 0a1d6cf4d0 Read sample rate directly from control transfer to eliminate callback. 2023-10-17 13:06:55 +02:00
HiFiPhile 656e1e416a Add flow control for IN transfer. 2023-10-17 09:46:01 +02:00
HiFiPhile 8b2cb63da8 Fix naming nBytesPerSample. 2023-10-10 18:22:20 +02:00
HiFiPhile b5c839f739 Merge branch 'master' of https://github.com/hathach/tinyusb into uac_interl 2023-10-10 15:02:25 +02:00
denis.krasutski ce627f4318 feat(ch32f20x): add support of ch32f20x 2023-10-06 13:04:54 +03:00
hathach 67e34267a6 change tuh_max3421_spi_xfer_api() signature
tested working with sam d21 and d51, not tested with nrf52, seem not
working with esp32
2023-10-04 18:00:32 +07:00
hathach 8348631bf5
improve esp32 ci, build esp32 with -DDMAX3421_HOST=1 for max3421 testing
revert change in hcd.h
2023-09-28 16:15:31 +07:00
hathach 6b8933cfe8
fix build with new freertos host example 2023-09-28 12:55:59 +07:00
hathach 277852afc1
fix esp32 msc example 2023-09-28 10:56:38 +07:00
hathach 76c43a5bdc
Merge branch 'master' into add-max3421-esp32 2023-09-27 17:52:18 +07:00
hathach 3b0ffd0f48
change hcd_int_handler(rhport, in_isr) signature: add in_isr
change tuh_int_handler() to take in_isr as optional parameter (default =
true)
2023-09-27 15:51:03 +07:00
hathach 2f6592de7f
update max3421 to have hcd_int_handler_ext() 2023-09-27 11:30:18 +07:00
bac 1168e4e163 Added support for USB2 HS peripheral (with integrated HS PHY) on STM32U59x chips 2023-09-26 15:27:17 +01:00
hathach f6ca86c3dd
tested cdc_msc_hid_freertos with samd51
add -Wno-error=format for espressif
wrap up cdc_msc_hid_freertos
2023-09-26 19:09:36 +07:00
hathach a7c136c03f
adding host/cdc_msc_hid_freertos example 2023-09-25 16:53:11 +07:00
HiFiPhile 6be7f354c2 Fix cast-align. 2023-09-19 16:35:05 +02:00
HiFiPhile 9d0251f7a6 Fix UAC interleaved copy. 2023-09-19 15:42:52 +02:00
hathach 81cd995108
add default CFG_TUH_MAX3421 = 0, default spi speed for samd21/samd51 to 12Mhz 2023-09-18 22:15:31 +07:00
Ha Thach e9ba93315c
Merge pull request #2245 from arduino/fix_msd_extraneus_bytes_on_reading
Fix msd extraneus bytes on reading
2023-09-12 12:53:52 +07:00
hathach c074488f75
minor rename 2023-09-09 12:20:16 +07:00
maidnl 228acbeac2 wait_pipe_fifo_empty() now returns bool (as expected using TU_ASSERT macro) 2023-09-08 15:48:05 +02:00
maidnl 7ce4cfa638 renesas: added wait function for IN transaction
This fixes a problem found on MSD class where data read from from disks were sometimes partially overwritten by the status MSD message ("USBS...").
The function introduced wait for the hw fifo pipe to be empty, that prevent that new writing in the fife overwrite data which are not yet be transmitted by hw.
2023-09-08 10:49:05 +02:00
hathach 21ab40bab2
- wrap up hcd max3421, work well with nrf52840
- also add usbh_defer_func()
2023-09-07 12:38:18 +07:00
hathach 1b9108ea0d
minor debug clean up 2023-09-06 17:11:35 +07:00
hathach ed0a233d48
vastly improve attach/detach device, still have issue where thing is still hanged occasionally. 2023-08-31 21:28:27 +07:00
hathach 3b7d5aa042
improve connection & disconnection detection. But there is still issue when CONDETIRQ occurs but we are disabled interrupt (for osal queue access). 2023-08-31 16:52:09 +07:00
hathach 41493426b3
use ep buf to keep setup packet, work well with hid device 2023-08-30 16:21:43 +07:00
hathach 1ab488eb06
call xfer_complete_isr() when result is not successful (stalled or failed) 2023-08-30 16:04:18 +07:00
Alexander Mueller 9665843635 Fix the weak dcd_edpt0_status_complete for Keil Compiler
The Keil compiler seems to have different semantics and the defined function was never called.

The same is probably true for the other weak functions. I can change those too.
2023-08-29 18:16:50 +02:00
hathach 2a814a99af
- hcd_setup_send() also check for busy flag
- xact_inout() to support send setup
2023-08-29 20:27:37 +07:00
hathach 3740a3287a
- correct tuh_max3421e_int_api() for nrf52
- hcd_int_disable/enable is software only to reduce interrupt lag
2023-08-29 18:22:21 +07:00
hathach b31924e13e - add xfer_complete_isr()
- merge addr0 ep to pool
- add control status to xact in/out
- use atomic flag busy to ensure only 1 transfer is active at any time
- execute pending transfer after one is complete (or clear busy flag)
- change rtt mode to block if full
2023-08-28 12:41:44 +07:00
hathach 502b1bdda6
more update to transaction 2023-08-27 23:45:34 +07:00
hathach cd7464a884
try next endpoint when received NAK 2023-08-25 17:37:09 +07:00
hathach ac00b91472
add xact_out(), xact_in() to manage transfer 2023-08-25 17:26:57 +07:00
hathach ecf2f91042
use endpoint pool for more flexible multiple devices support 2023-08-25 16:36:28 +07:00
hathach 09ceaa6cf3
add osal mutex for spi 2023-08-25 13:18:47 +07:00
hathach f5ebc1700f
add spi lock with interrupt enable/disable 2023-08-25 12:12:44 +07:00
hathach e6cf125e53
save data toggle, always retry NAK. work with msc device 2023-08-24 16:46:20 +07:00
hathach 344932d27e
add tuh_max3421e_int_api(), retry control if received NAK 2023-08-24 16:27:47 +07:00
hathach 3ed5d6c372
complete enumeration 2023-08-24 16:27:12 +07:00
hathach 2c237b1ae4
able to complete 1st get device descriptor and set address 2023-08-23 17:49:28 +07:00
hathach e3f3179924
able to get 8 byte descriptor, but read(RCVBC) always return 0
- rename max3421e to max3421
- fix incorrect bitmask for HCTL, fix initial device connect
- fix bus reset cause connect IRQ
2023-08-23 15:08:12 +07:00
hathach 274578ff46
able to send setup packet 2023-08-22 23:17:12 +07:00
hathach b413439416
able to detect new device and start enumerating 2023-08-22 19:57:59 +07:00
hathach cacc96b25d
adding connection event handling, add nrf gpio interrupt for max2341e interrupt pin 2023-08-18 17:39:10 +07:00
hathach 824e585e2b
ground works for hcd max3421e 2023-08-18 14:07:38 +07:00
hathach 9257a0f562
- update nrf52 bsp for cmake
- add empty tuh_int_handler/tud_int_handler if corresponidng stack not enabled
- add hcd_template.c
2023-08-18 12:48:12 +07:00
hathach f4845e4e6c
minor comment 2023-08-16 14:43:58 +07:00
hathach 0109ffbdcb fix abort transfer does not release endpoint, also reset state if it is control transfer 2023-08-16 14:31:14 +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 7537985c08
Merge pull request #2222 from rppicomidi/fix-2188
fix issue 2188: support usbh_app_driver_get_cb()
2023-08-15 23:33:19 +07:00
hathach 67a374d932
more rename 2023-08-15 22:57:05 +07:00
hathach 1b33a31536
more minor clean up
- also rename usbh_classdriver.h to usbh_pvt.h to consitent with usbd
2023-08-15 22:54:07 +07:00
rppicomidi 9d94296741 fix issue 2188: support usbh_app_driver_get_cb() 2023-08-14 15:38:48 -07:00
tswan-quasi b5ba12119d UINT16_MAX stdint macro usage 2023-08-14 09:01:30 -04:00
tswan-quasi bd51afb091 min on cdc r/w 2023-08-14 08:49:52 -04:00
Ha Thach 92457ec99f
Merge pull request #2202 from Rocky04/patch-4
Invoke unmounted state on configuration reset
2023-08-09 20:48:26 +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 6d877c3170
added cmake for lpc54, update lpc55 2023-08-08 18:50:24 +07:00
Rocky04 9602c06f8d
Correcting comments 2023-08-07 21:25:50 +02:00
Rocky04 c959e65edd
Fixing wrong callback placement 2023-08-07 21:16:41 +02:00
hathach 4938971aad
code format 2023-08-07 20:48:09 +07:00
hathach 18646179d0
fix host msc get maxlun not using aligned section memory 2023-08-07 20:48:08 +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
Ha Thach 6d03bb9ffc
Merge pull request #2052 from arduino/renesas_ra_hs_rebased
Renesas_RA: add support for board with HS USB port
2023-08-03 20:41:13 +07:00
hathach a160da1f2b
add lpc43 family 2023-08-03 17:19:47 +07:00
hathach 473f37df95
add osal queue name if needed
also mass change configQUEUE_REGISTRY_SIZE = 4
2023-08-03 12:05:21 +07:00
hathach de8faf8664
Merge branch 'master' into pr2091 2023-08-03 11:09:33 +07:00
hathach d09604d636
Revert "Name queues for easier FreeRTOS debugging with task- and queue-aware debuggers"
This reverts commit 11fba59319.
2023-08-03 11:07:23 +07:00
Rocky04 9560d0813f
Set unmounted on configuration reset 2023-08-02 15:25:08 +02:00
hathach 979bf32266
default class driver log level to CFG_TUH/TUD_LOG_LEVEL allow application to selectively disable usbd/usbh or driver log 2023-08-02 15:34:18 +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 cb47231518
revert out of scope changes 2023-07-31 17:13:37 +07:00
Ha Thach ce54984556
Merge pull request #2093 from abakosh/no_osal_delay
osal_none: make it possible to override the task delay function
2023-07-31 17:12:28 +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 dc74e634f9
fix unaligned hub status_change 2023-07-25 12:35:40 +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 fd29fd923a
clean up 2023-07-24 20:53:44 +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
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
hathach 16ad918d96
prefer application callback over built-in driver 2023-07-20 17:37:06 +07:00
hathach 77495cf119
improve logging, allow easier to turn off usbd, driver logging
can be useful when focusing on let's say usbh
2023-07-20 17:12:00 +07:00
Aladdin Bakosh 3fdd2a40b2 osal_none: make it possible to override the task delay function 2023-07-18 14:14:23 +02: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
Ha Thach f1e006d09b
Merge pull request #2137 from hathach/cmake-ra
enhance RA family
2023-07-03 12:25:29 +07:00
Ha Thach 942eb0f323
Merge pull request #2129 from dauc/patch-1
Fix minor spelling issues
2023-07-02 23:40:37 +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
Dave Nadler 11fba59319 Name queues for easier FreeRTOS debugging with task- and queue-aware debuggers 2023-06-28 17:25:22 -04:00
Dave Nadler cca4be6c67
Merge branch 'hathach:master' into master 2023-06-28 17:05:19 -04:00
Devin Auclair 98fb10a724
Fix minor spelling 2023-06-28 14:03:18 -04:00
Ha Thach fe77b6713b
Merge pull request #2085 from georgeboc/msc-ready-bug-fix
Fixes bug in tuh_msc_ready
2023-06-27 17:57:35 +07:00
hathach e43387abac
rework cmake with rtos support add RTOS to family_configure_device/host/dual_example() 2023-06-27 15:45:38 +07:00