128 Commits

Author SHA1 Message Date
hathach
6a36c74b10
embed metadata to family.c and board.h to generate supported boards doc 2024-12-27 09:11:09 +07:00
hathach
453d69517b
fix multiple flag on compiling 2024-11-27 11:10:06 +07:00
hathach
3a89442dba
use arm arch to detect rp2040 2024-11-11 21:55:30 +07:00
subsonicpulse
8174ab0640
Fix Usage of Bootsel Button for Pico 2
see code from 
https://github.com/raspberrypi/pico-examples/blob/master/picoboard/button/button.c
2024-11-07 12:16:42 +01:00
hathach
57aac432b5
add new tusb_int_handler(rhport, in_isr) as common irq handler
update tusb_init() to take rhport and role, defined as macro with optional argument for backward compatible
2024-10-10 16:28:36 +07:00
hathach
c419b1e7c5
add pico2 rp2350 (arm) board
add pico2 to hil ci
2024-09-13 19:12:26 +07:00
hathach
ccf886ca80
add pio-usb host test to hil. fix build as well 2024-08-22 18:51:32 +07:00
hathach
2871bb0da6
fix spi_set_format() -Wnull-dereference when compiling with -Os 2024-08-11 00:51:51 +07:00
hathach
c07928e1b3
fix build with rp2040 PICO_DEFAULT_SPI rename 2024-08-10 22:07:10 +07:00
graham sanderson
0ebe81f4c3 add explcit dependency 2024-07-29 12:34:25 -05:00
graham sanderson
cfb44a3892 add clocks.h as set_sys_clock_khz is moving there from stdlib.h 2024-07-29 12:29:27 -05:00
hathach
4396ecd22c
change COMPILE_DEFINE to CFLAGS_CLI for cmake/make 2024-06-25 11:31:19 +07:00
hathach
ac3ec59845
add optional COMPILE_DEFINE from cmake cli 2024-06-18 16:18:58 +07:00
hathach
d79c71abf5
update flash openocd 2024-05-06 10:52:52 +07:00
hathach
4a183d2e3f
try to add clang for rp2040 but pico-sdk does not support that. (got assert.h file not found) 2024-04-19 23:17:01 +07:00
hathach
7910cc2981
fix build with rp2040 + max3421
- forward MAX3421_HOST=1 from makefile to cmake
- add feather_rp2040_max3421 board to run with ci for rp2040 + max3421
2024-04-04 10:55:14 +07:00
hathach
baffadca91
remove pca10095 suppport for max3421
also remove pico_bootsel_via_double_reset from rp2040
2024-03-22 17:54:08 +07:00
hathach
551e47a464
allow rp2040 to use max3421e as host controller
- fix warnings build hcd max3421 with rp2040
- add tinyusb_host_max3421 target for rp2040 cmake, -DMAX3421_HOST=1
will enable this
- add max3421 driver implementation for rp2040 family
- update tusb_config for host to allow easy enable host selection for
rp2040 (default/pio-usb/max3421)
2023-12-26 22:50:01 +07:00
hathach
b67855468d
fix build 2023-12-11 17:56:10 +07:00
hathach
ea885d5c83
reduce s3 baudrate to prevent usb isssue, reset rp2040 usb for board test example 2023-12-11 17:48:27 +07:00
hathach
0a4d92a71e
update hil for pi4 to use new hil_test.py 2023-11-28 18:28:45 +07:00
Ha Thach
accc3fd737
Merge pull request #2151 from kilograham/rp2040_build_fixes
Fix build issues when building for RP2040 from pico-examples/pico-sdk.
2023-08-07 11:14:04 +07:00
hathach
041f510f90
add board_get_unique_id() for serial number
implemented board_get_unique_id() for rp2040 and L4
2023-08-03 20:42:34 +07:00
hathach
cf91660cee
rename hw/bsp/board.h to board_api.h 2023-08-03 15:44:05 +07:00
0xCCF4
8226b046a9
Fixed typo in rp2040 hw bspw family.c 2023-07-28 11:19:08 +02:00
hathach
f295aaf185
add hcd abort xfer for rp2040 pio usb 2023-07-24 20:58:50 +07:00
graham sanderson
08a1892801 add is_compiler_supported_by_pico_pio_usb()
previosuly users of TinyUSB (e.g. pico-examples) would have to decide this for themselves. This function couples
the check closer with the actual version of Pico-PIO-USB used (since TinyUSB picks)
2023-07-18 11:04:46 -05:00
graham sanderson
3678a25baa Fix build issues when building for RP2040 from pico-examples/pico-sdk.
* include_guard requires GLOBAL as family.cmake is included in multiple non child places
* the following recently added check is suprfluous (family_configure_host_example for rp2040 should do this already),
  and breaks if pico_pio_usb is not avaialble, so i have removed
   # Add pico-pio-usb for rp2040 since user can choose to run on bit-banging host
   if(FAMILY STREQUAL "rp2040")
      family_add_pico_pio_usb(${PROJECT})
   endif()
* added new familt_example_missing_dependency functino to print missing dependency warning, so
  pico-examples can override it to be less in your face, and also more contextual to pico-examples
2023-07-18 09:03:01 -05:00
hathach
6284f2d722
add hcd_frame_number() for pio-usb host 2023-06-29 18:58:33 +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
hathach
a61d0f074f
more rp2040 family clean up 2023-06-26 23:08:59 +07:00
hathach
8aa28e63fb
minor clean up with include_guard() 2023-06-26 17:54:31 +07:00
hathach
3cfb838ba7
fix warnings when enable rtt with rp2040 2023-06-26 17:03:45 +07:00
hathach
c0ecf8b50f
move set TOP to family_support.cmake 2023-05-26 14:56:22 +07:00
hathach
4c9605910f
update cmake with freertos 2023-05-25 21:27:26 +07:00
hathach
1a229f3ce2 fix pio vbus typo 2023-04-26 22:36:17 +07:00
hathach
99315bcca3 adding more cmake support 2023-03-29 14:36:43 +07:00
hathach
4cee79af27
rename and change default pio usb pin to adafruit feather usb host 2023-03-23 13:08:09 +07:00
hathach
3623ba1884
fix trailing space and new line
temporarily disable codespell
2023-03-17 16:12:49 +07:00
Ha Thach
16daad8164
Merge pull request #1960 from hathach/fix-host-enumerate-mul-device
Fix host enumerate multiple devices from multiple host controllers
2023-03-17 15:27:56 +07:00
Ha Thach
96d064e923
Merge pull request #1860 from howard0su/pico_freertos
Allow config OS for RP2040
2023-03-17 14:57:13 +07:00
hathach
317177c83d
update host example, add pio-pico-usb for rp2040 2023-03-17 14:06:25 +07:00
graham sanderson
b7fa90e706 rp2040: Fixup lib and example compile for LLVM Embedded Toolchain for ARM 2023-03-02 14:32:22 -06:00
Ha Thach
b66c2d5f0a
Merge pull request #1796 from Sinitax/master
Fix ifdefs for disabled uart stdio in rp2040 family
2023-02-22 17:40:54 +07:00
hathach
c01aee6c1a
revert some changes 2023-02-22 15:14:56 +07:00
hathach
78a014ef18
move check LIB_PICO_STDIO_UART to board.h 2023-02-22 15:13:27 +07:00
graham sanderson
8d3f0ffb95 * don't force dependency on pico-pio-usb submodule
* suppress compiler warning/errors especially in pico-pio-usb
* disable use of pico-pio-usb on gcc 11.3+ for now as it doesn't compile
2023-02-06 10:07:39 -06:00
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
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
Howard Su
eb7aacb51f Allow config OS for RP2040 2023-01-18 02:30:05 +00:00