summaryrefslogtreecommitdiff
path: root/src/portable/raspberrypi/rp2040/rp2040_usb.c
AgeCommit message (Collapse)Author
2026-07-29rp2xxx: added rp2usb_deinit() to fix 'No spinlocks are available'Geurt Vos
2026-07-09dcd(rp2040): re-issue in-flight transfer on clear-halt toggle resethathach
Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01HeF2gZ1M7GWkz6Av4BpKPg
2026-07-02license: use SPDX identifiers for src/ headers (#3749)Ha Thach
* license: use SPDX identifiers for src/ headers Replace the full ~20-line MIT license boilerplate on every src/ file with a two-line SPDX tag (SPDX-FileCopyrightText + SPDX-License-Identifier), following the REUSE convention used by CircuitPython and the Linux kernel. Removes ~3500 lines of duplicated boilerplate.
2026-04-02Apply suggestion from @CopilotHa Thach
Co-authored-by: Copilot <[email protected]>
2026-04-02rp2040: fix RP2350 hard fault in unaligned_memcpy to USB DPRAMhathach
Use volatile byte accesses to prevent the compiler from widening the byte-by-byte copy loop into 16/32-bit accesses, which cause a hard fault on RP2350 when targeting USB DPRAM (device memory). Closes #3554
2026-04-01fix issue caused by merging active + pending statehathach
2026-04-01reduce code size, use state to replace active + pendinghathach
2026-03-31finally get rp2040 host epx working with 2-sof solution for switchinghathach
2026-03-31host abort transfer on short packet in double buffer.hathach
2026-03-30hcd rp2 add double buffered for control endpoint transfers.hathach
2026-03-28rp2 common refactorhathach
2026-03-28host epx clean uphathach
2026-03-27rename and clean uphathach
2026-03-27clean up hw_endpoint_open(), still has issue with E15 and ping-pong (slow read).hathach
2026-03-26implement ping-pong double buffered for both tx and rxhathach
2026-03-25fix e4 incorrect buf with incorrect buf_id = 1hathach
2026-03-25update hcd to handle interrupt per bufhathach
2026-03-24handle buf_status in per buffer basic (INTERRUPT_PER_BUFFER), this allows us ↵hathach
to sync/move half data payload instead of waiting for pair complete. Refactor endpoint control and buffer handling functions for clarity and efficiency.
2026-03-23add rp2040 sof + stop_trans on nak. increase nak_poll fs/ls delay to 300 us ↵hathach
to prevent xfer is ack while stopping.
2026-03-19Add EPX transfer scheduling when hcd_edpt_xfer() is called while epx is busyhathach
2026-03-19Merge branch 'refs/heads/master' into rp2040-hcd-epxhathach
2026-03-19rp2 disable hwfifohathach
2026-01-16renamehathach
2026-01-16refactor hcd, get both control and interrupt endpoint workinghathach
2026-01-10remove transfer_type from hw_endpointhathach
2026-01-09enable dedicated hwfifo for rp2hathach
2026-01-09only apply errata E5 and E15 for rp2040. rp2350 already fixes thesehathach
2026-01-08fix hcd force_single mistake by refactorhathach
2026-01-08minor clean uphathach
2026-01-08change signature for hwep_buf_ctrl_* to take pointer to buf control instead ↵hathach
of hwep
2026-01-07remove hw_endpoint_t rx, rename/change signature of helper functionshathach
2026-01-07refactor remove endpoint_control/buffer_control from hw_endpoint_thathach
2025-02-28fix(hcd_rp2040) assert/panic endpoint already active: when a device reset ↵hathach
while having on-going control transfer
2024-07-17RP2040: no need to clear usb_hw (usb registers) as they are reset to default ↵Liam Fraser
state by a hardware reset
2024-07-17RP2040: Use our own unaligned memcpy to avoid alignment faults with some ↵Liam Fraser
memcpy implementations
2024-03-13- only abort ep0 if it is activehathach
- rename reset_ep0_pid() to reset_ep0() - minor update log message
2024-03-11reformat codehathach
2023-07-02also fixed pico_trac() log messages.Lars Pötter
2023-07-02made line ends consistent.Lars Pötter
2023-06-26fix warnings when enable rtt with rp2040hathach
2023-03-17Merge branch 'master' into portabilityhathach
2023-01-31fix typoshathach
2023-01-31move errata to end of c filehathach
2023-01-31add e15 prefix or walkaround related functions, also minor refactorhathach
2023-01-31minor clean uphathach
2023-01-24rp2040: avoid device-mode state machine hangJonathan Bell
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-23rp2040: export hw_endpoint_start_next_buffer() and hw_endpoint_lock_update()Jonathan Bell
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.
2022-11-30white spaceshathach
2022-11-23Fix RP2040 Issue 1721rppicomidi
2022-09-13[rp2040] Wrap GCC pragmas in #ifdef __GNUC__Ben Avison
IAR generates warning Pe161 'unrecognized #pragma'.