summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2026-06-04Merge branch 'master' into dwc2_postfixhathach
2026-06-03dwc2: address Copilot review (comment grammar/typo, tinyusb.json f407 dedup)hathach
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-03dwc2: remove investigation debug logginghathach
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-03refactor(cmake): comment out unused target folder propertieshathach
2026-06-03dwc2: submit setup packet on SETUP_DONE and drop spurious EP0 RX_COMPLETE on ↵hathach
core v3.10a (STM32L476) DWC2 core rev 3.10a pushes an extra EP0 RX_COMPLETE (RXFLVL PKTSTS 0x3) that is not a real OUT data completion, in two cases flagged on DOEPINT: - STPKTRX (Setup Packet Received): between SETUP_RX and SETUP_DONE - STSPHSRX (Status Phase Received, control write): after the OUT data stage when the host starts the IN status phase
2026-06-02dcd/dwc2: fix back-to-back SETUP reception in DMA modeHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-06-01Merge pull request #3657 from hathach/usbh-add-control-queueHa Thach
Add control transfer fifo for host stack
2026-06-01CFG_TUH_CONTROL_PENDING_QUEUE_SZ defefault to 4 if hub is eanbled, 2 if nothathach
2026-06-01ultrareview nits: keep xfer_result table in sync, hoist blinky loophathach
- src/tusb.c: extend tu_str_xfer_result[] with "ABORTED" and "INVALID" to match the new enum size. Not reachable today (no HCD posts those values through hcd_event_xfer_complete), but keeps the enum/table invariant intact so future HCDs that surface ABORTED don't index OOB. - examples/dual/dynamic_switch/src/main.c: apply the same while(1) hoist already done for cdc_task / print_devinfo_task to led_blinking_task. On OS_NONE the loop returned mid-iteration, which on first call could fire multiple back-to-back toggles while start_ms (initially 0) caught up to uptime. Co-Authored-By: Claude Opus 4.7 <[email protected]>
2026-05-31cdc_host: fix undeclared 'idx' when only LINE_CONTROL_ON_ENUM definedAndrew Leech
idx is used in the ENUM_SET_LINE_CONTROL path guarded by CFG_TUH_CDC_LINE_CONTROL_ON_ENUM, but was declared only under CFG_TUH_CDC_LINE_CODING_ON_ENUM. Defining LINE_CONTROL_ON_ENUM without LINE_CODING_ON_ENUM therefore failed to compile with an undeclared identifier. Guard the declaration under either macro. Signed-off-by: Andrew Leech <[email protected]>
2026-05-30Merge pull request #3658 from wjklimek1/mtp-out-transfer-fixZixun LI
Fix premature MTP phase change after short MTP OUT transfer
2026-05-29Merge branch 'master' into usbh-add-control-queuehathach
2026-05-29dwc2: process IN EP before OUTHiFiPhile
To avoid STATUS IN completion of previous control transfer treated as next DATA IN when IRQ latency is high. Signed-off-by: HiFiPhile <[email protected]>
2026-05-29Handle OUT transfer completion in MTPWojciech Klimek
Handle OUT transfer differently from IN to not prematurely change MTP phase when host sends short packet that is not end of MTP data phase. Only reaching container length or ZLP should change phase.
2026-05-29Implement asynchronous control transfer queuing for USB host stackhathach
- Added a pending FIFO queue for asynchronous control transfers when the active slot is busy. - Introduced `control_xfer_dispatch_pending` to handle queued transfers on slot availability. - Improved synchronization for blocking and non-blocking transfer modes, preventing deadlocks in RTOS. - Refactored and renamed related functions for clarity and consistency. - Enhanced error handling and callback invocation for failed or stale transfers.
2026-05-29Merge remote-tracking branch 'tinyusb/master' into fix/Dwc2Stm32U5HiFiPhile
2026-05-29dwc2: move OUT transfer management into RXFLVL IRQHiFiPhile
- GRXSTSP register has internal FIFO, receiving events won't mix up (STATUS OUT & next SETUP) - Improve efficiency, remove 2nd IRQ overhead Signed-off-by: HiFiPhile <[email protected]>
2026-05-28abstract OS logic with `CFG_TUSB_OS_HAS_SCHEDULER` to simplify conditional ↵hathach
checks
2026-05-27osal add osal_task_get_current_handle()hathach
2026-05-27dwc2: fix EP0 DMA setup race conditionHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-05-27dwc2: simplify EP0 ZLP handlingHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-05-26ch32_usbhs: fix endpoint stall length index and clear-stall responseJie Feng
Fix issue in the stall handling: - dcd_edpt_stall() for an IN endpoint cleared EP_TX_LEN(0) instead of EP_TX_LEN(ep_num), clobbering endpoint 0's transmit length register when stalling any other IN endpoint. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
2026-05-25optimize interrupt handling timeHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-05-25chore: resolve .gitignore merge conflict with mastercopilot-swe-agent[bot]
Co-authored-by: HiFiPhile <[email protected]>
2026-05-25Merge remote-tracking branch 'tinyusb/master' into musb_ep0_raceHiFiPhile
2026-05-24Merge remote-tracking branch 'tinyusb/master' into stm32c5HiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-05-24dcd/stm32_fsdev: workaround CH32 EP0 premature OUT ACKHiFiPhile
Track EP0 control transfer state from SETUP (direction and wLength) and gate CH32 EP0 handshakes accordingly. Switch EP0 type away from control to bulk to block unsolicited OUT ACKs during control read/write gaps, then restore control type when EP0 transfer is explicitly armed. Signed-off-by: HiFiPhile <[email protected]>
2026-05-23dcd/ch32x: optmize CTRL reg writing, basically revert e14b0e85HiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-05-23dcd/ch32hs: refactor transfer flowHiFiPhile
Refactor the driver to follow USBFS style for easier maintenance. Replace the old packet/response helpers with explicit queue and update paths for IN and OUT transfers. Introduce transfer validity tracking and per-endpoint data toggle state. Reset toggle state on init, close-all, endpoint close, clear-stall, and bus reset. Initialize endpoint controls consistently in NAK + TOG_0 mode. Tighten EP0 setup/status handling and route transfer IRQ processing through the transfer-flag path. Stop enabling ISO_ACT in INT_EN and clear unhandled interrupt flags explicitly. Signed-off-by: HiFiPhile <[email protected]>
2026-05-23dcd/ch32fs: do not set EP0 to ACK on status completeHiFiPhile
It would casue race condition, SETUP packet is always acked. Signed-off-by: HiFiPhile <[email protected]>
2026-05-23dcd/ch32fs: clear INT flag after processingHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-05-23dcd/ch32x : code reformatHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-05-23dcd/ch32fs: set EP to NAK earlier to reduce spuroius transferHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-05-22dcd/ch32fs: reset EP on clear stallHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-05-22dcd/ch32fs: fix ISO IN transferHiFiPhile
OUT is still buggy Signed-off-by: HiFiPhile <[email protected]>
2026-05-22dcd/ch32fs: only enable EP0 ACK if no data stage, reduce raceHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-05-22dcd/ch32fs: reset EP regs on bus resetHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-05-22ch32v20x: fix port1 IP selectionHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-05-22Merge remote-tracking branch 'tinyusb/master' into mickabrig7/masterHiFiPhile
2026-05-22Merge remote-tracking branch 'tinyusb/master' into fix/Dwc2Stm32U5HiFiPhile
2026-05-22dwc2: handle EP0 status OUT in RXFLVL interruptHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-05-19Merge pull request #3571 from sauloverissimo/feat/midi2-device-host-driverZixun LI
feat: Add USB-MIDI 2.0 Device and Host class drivers
2026-05-19midi2_host: convert TX to raw FIFO mirroring midi2_device refactorSaulo Veríssimo
2026-05-18midi2: convert to raw Tx FIFO for better segmentation handling, add count to ↵HiFiPhile
packet api Signed-off-by: HiFiPhile <[email protected]>
2026-05-18midi2: boundary-aware drain in xfer_cb to keep UMP packets intactSaulo Veríssimo
2026-05-17midi2: drain pattern for RX FIFOSaulo Veríssimo
Default RX/TX buffers to EPSIZE for both device and host. Document drain-in-loop on ump_read; example device callback drains until empty.
2026-05-17midi2: scale device buffers with EPSIZESaulo Veríssimo
Match midi2_host pattern. Literal 256 underran HS endpoints (512B).
2026-05-17midi2: per-interface weak callbacks for UMP Stream configSaulo Veríssimo
Lets each instance return different NUM_GROUPS, NUM_FUNCTION_BLOCKS, EP_NAME and PRODUCT_ID. Defaults fall back to the macros.
2026-05-17midi2: peek 4 bytes for MT, restore 256 buffersSaulo Veríssimo
MT is in byte 3 of the UMP word in LE memory, not byte 0. Buffers at mps blocked RX xfer re-arm on partial packets.
2026-05-17midi2: use hwfifo if supportedHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>