Commit graph

736 commits

Author SHA1 Message Date
Graham Sanderson
39fafaa434
Add SPARE_IRQs to the SVD (#2271)
* Add SPARE_IRQ to RP2350 SVD (note not having an `<addresBlock>` or one with a size of zero is not a legal SVD, so including something hopefully harmless

* Add SPARE_IRQ definitions to RP2040 intctrl.h, and add assertions on competing #defines as these were called USER_IRQs in the SDK 1.x

* Add SPAREIRQ_IRQ to rp2040 assembler, and fix name on rp2350 - this is backwards incompatible, but unlikely used

* add SPARE_IRQs to RP2040 svd too
2025-03-25 13:14:28 -05:00
Andrew Scheller
fa94f6448a
Look for PICO_CONFIG: entries in .S files too (#2368)
(and fix the errors that this found)
2025-03-24 17:28:59 -05:00
Michael Brase
e43b7534ba
Add new stdio_usb_call_chars_available_callback() function (#2300)
When the user links in tinyUSB directly, the pico_stdio_usb library
disables some of its functionality, including its built-in background
processing thread. The user can implement their own background thread
in order to continue using the stdio functionality, except that there
is no wey to trigger the registered chars_available_callback. This
commit adds a new `stdio_usb_run_chars_available_callback()` method to
allow user's background threads to run the callback.
2025-03-22 18:47:40 -05:00
will-v-pi
bbb94e51f9
Add rom_pick_ab_update_partition function (#2182) 2025-03-22 17:59:05 -05:00
Michael Brase
332eb5345b
Add new feature defines to pico_stdio_usb (#2296)
This change adds the following to pico_stdio_usb:
- `PICO_STDIO_USB_ENABLE_IRQ_BACKGROUND_TASK`
- `PICO_STDIO_USB_ENABLE_TINYUSB_INIT`
- `PICO_STDIO_USB_USE_DEFAULT_DESCRIPTORS`

These defines replace some ifdefs that were previously gated by the
`LIB_TINYUSB_DEVICE` define and will allow finer grained control.
All of these defines default to 1 if LIB_TINYUSB_DEVICE is not defined
and 0 if LIB_TINYUSB_DEVICE is defined, which should preserve the
old behavior.
2025-03-22 12:49:58 -05:00
David Dyck
005759d791
Fix #2253 cybt_printf by wrapping with NDEBUG (#2323)
Observe that src/rp2_common/pico_cyw43_driver/cybt_shared_bus/cybt_shared_bus_driver.c
wraps the definition of cybt_printf with #ifndef NDEBUG
Apply this to src/rp2_common/pico_cyw43_driver/cybt_shared_bus/cybt_shared_bus.c

Co-authored-by: David Dyck <david.dyck@checksum.com>
2025-03-19 16:16:43 -05:00
Andrew Scheller
645b33c31f
Update hellbender_0001.h (#2359)
Replace the incorrect `#define PICO_RP2350B 1` with the correct `#define PICO_RP2350A 0`

Fixes #2286
2025-03-19 11:03:53 -05:00
Graham Sanderson
ba936d3049
pico_lwip_arch is actually what depends on pico_rand (#2303) 2025-03-18 14:06:40 -05:00
Graham Sanderson
a995b975ec
Missed doc change in #850 (#2302) 2025-03-18 13:41:43 -05:00
Michael Brase
26e7dc5c48
Add Bazel label flag for overriding tusb_config.h (#2264)
This adds `//bazel/config:PICO_TINYUSB_CONFIG`, which is used to select
which tusb_config.h gets linked into the tinyUSB port. This defaults to
the tusb_config.h from the pico_stdio_usb (same as before), but allows
Bazel users to override this config with their own.
2025-03-18 13:41:14 -05:00
David Dyck
6a56480879
Remove FIXME delete comment (#2341)
Fixes #2337
per @kilograham
2025-03-18 13:39:10 -05:00
Damien George
cc1ac399ed
Remove assignment of cyw43 last_size/header/backplane_window variables (#2306)
They are never used by the cyw43-driver code, because `F1_OVERFLOW_CHANGE`
is disabled.

Signed-off-by: Damien George <damien@micropython.org>
2025-03-18 13:28:15 -05:00
gsboylan
a45e1e46f5
Add board file for Eelectronicparts Pico Mini in 2,4,8,16MB variants (#2346)
Store page and pinout diagrams are here:
https://www.eelectronicparts.com/products/rp2040-pro-mini-pico-development-board-for-raspberry-pi-dual-core-mciro-python
2025-03-18 13:27:07 -05:00
Dryw Wade
4f31ef1761
Add SparkFun XRP Controller header (#2347) 2025-03-18 13:22:27 -05:00
eightycc
ab12d556cd
Fix use of PICO_RP2040 macro. (#2356) 2025-03-18 10:08:11 -05:00
Graham Sanderson
b1676c18a3
fix return type of enable/disable interrupt methods... add host versions for completeness (#2310) 2025-03-09 14:39:21 -05:00
Alex Brudner
dd1f48335b
Add upcoming sparkfun board (#2329) 2025-03-05 10:46:07 -06:00
Andrew Scheller
26ab4be834
Fix misleading error messages in spin_lock.h (#2326)
(looks like this was a copy-paste mistake)
2025-03-03 11:21:16 -06:00
graham sanderson
ee68c78d0a fix doc for SYS_CLK_VREG_VOLTAGE_AUTO_ADJUST_DELAY_US 2025-02-19 16:32:05 -06:00
graham sanderson
6a7b4c7160 fix warning 2025-02-18 17:20:22 -06:00
Graham Sanderson
2dd58bff9e
fix emulated asynchronous divisions started via hw_divider_divmod_s32_start and hw_divider_divmod_u32_start (#2299) 2025-02-18 12:18:25 -06:00
Graham Sanderson
186e715462
fix up access type of CHAN_ABORT register in RP2040.svd and RP2350.svd (#2270) 2025-02-18 12:17:34 -06:00
Graham Sanderson
a38da922e5
add cast (#2298) 2025-02-18 11:48:48 -06:00
Graham Sanderson
c757f36aac
add PICO_USE_FASTEST_SUPPORTED_CLOCK, and support vreg setting and SYS_CLOCK_MHZ=200 for rp2040 (#2285) 2025-02-18 09:51:51 -06:00
Andrew Scheller
7ce1ae8cdf
Comment typo (#2293) 2025-02-18 09:50:44 -06:00
graham sanderson
38776d8764 add missing define 2025-02-17 21:49:47 -06:00
Graham Sanderson
0ed224cf59
Add irq_has_handler() and use it to fix GPIO IRQ assert (#2277) 2025-02-17 16:07:27 -06:00
Graham Sanderson
59c9211589
Add enable_interrupts() and disable_interrupts() (#2276) 2025-02-17 11:23:29 -06:00
Graham Sanderson
7b96a34513
add missing extern C (#2284) 2025-02-17 10:53:50 -06:00
Graham Sanderson
c691da85e5
update previous fix as 1.0 < clkdiv < 2.0 IS supported on RP2350 (#2255)
* update previous fix as 1.0 < clkdiv < 2.0 IS supported on RP2350
2025-02-17 10:53:15 -06:00
Enrico Zaghini
04525b802e
Fixed linker error for lwIP PPP support (#2272) (#2278)
- Added `sys_jiffies` with weak linking for NO_SYS configuration
2025-02-16 14:26:46 -06:00
Graham Sanderson
f9d65a06ca
remove reference to hardware_busctrl doxygen group that doesn't exit (#2275) 2025-02-16 12:28:50 -06:00
David Dyck
1ca386847c
Correct type in comment in CMakeLists.txt (#2274)
correct outdated comment after 2 lines were deleted, but comment was not

Fixes https://github.com/raspberrypi/pico-sdk/issues/2273
2025-02-16 12:13:30 -06:00
Graham Sanderson
302fd9a811
Fix WAIT GPIO n for n > 32 and when using gpio_base = 16 (#2265)
- fix bug: pioasm was spilling bit 5 of arg2 into arg1
- make pio_add_program flip bit 5 of a WAIT GPIO instruction if gpio_base is 16

Note: pioasm will encode only the bits 4-0 of arg2 (the GPIO number), however it does indicate whether
0-15 means 0-15 or 32-47. This can only be fixed up when loading the program, and indeed once the GPIO
base is known. pio_can_add_program and friends already detected the cases where this was impossible
2025-02-14 09:26:22 -06:00
Graham Sanderson
7c023fa320
Increase default PICO_XOSC_STARTUP_DELAY_MULTIPLIER to 6 (ms) (#2245) 2025-02-12 11:40:56 -06:00
Andrew Scheller
de0416a079
Minor irq.h comment typos (#2257) 2025-02-12 10:56:57 -06:00
graham sanderson
564aa64904 minor irq.h comment tweaks 2025-02-12 09:34:48 -06:00
HugoTro
24c4480b82
Fix semicolon in makefsdata.py (#2238)
Simple semicolon that breaks the file otherwise
2025-02-11 16:39:14 -06:00
Dan Halbert
f407f5b8e8
boards/adafruit_feather_rp2350.h: add PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64 (#2248) 2025-02-10 10:18:33 -06:00
Graham Sanderson
05dbc11b4a
update stdio_usb CDC constants to the defaults used by TinyUSB, and allow the user to override them (#2246) 2025-02-07 16:52:18 -06:00
Steven Conaway
876c09cbfa
pico_flash: Support FreeRTOS Static Allocation (#2229) 2025-02-07 12:08:12 -06:00
Peter Harper
7dfbb3c958
Add a delay after rtc_set_datetime (#2156)
If you call rtc_get_datetime immediately after rtc_set_datetime you get
junk back. According to the datasheet "Writing to the RTC will take
2 clk_rtc clock periods to arrive". So add a delay after calling
rtc_set_datetime in aon_timer_set_time_calendar.

Fixes #2148
2025-02-06 09:24:30 -06:00
Graham Sanderson
eb5c2c3ff0
Clang related fixes (#2231)
* workaround change in llvm picked up by llvm ETA 19

* fix clang compilation not including floating point instructions in build output
2025-02-05 10:55:10 -06:00
Graham Sanderson
e85c3e5515
rationalize pico_float/pico_double libraries (#2208)
* on RP2350 _dcp variant now enables -msoft-float, since if you're using this at all it is likely because you don't want to use the VFP unit at all (to save stack space)
* implement all float_ and double_ conversion functions in all pico_float_pico_ variants and pico_double_pico on RP2040 and RP2350 (many were missing in some combinations)
* provide better granularity of what functions are wrapped in each case

also marked custom_xxx_funcs_test.c as not in bazel build yet
2025-02-04 16:19:17 -06:00
Graham Sanderson
7d450bf097
add a bunch of verbosity around shared vtables (#2230) 2025-02-04 16:17:52 -06:00
Luke Wren
b51fa1b747
Mark flash_devinfo_ptr() as RAM code to avoid flash call during flash_range_erase() (#2235) 2025-02-04 16:06:56 -06:00
Graham Sanderson
0d909920f1
clarify clock_configure and make it return the correct value achieved for bad clock inputs (#2225) 2025-02-04 11:17:07 -06:00
Graham Sanderson
5288585257
add multicore_lockout_victim_deinit. clear lockedout_flag for core1 during core1 reset (#2223) 2025-02-03 12:21:09 -06:00
Graham Sanderson
ccbd07c758
add extra assertions to pio.h (#2211)
* add extra assertions to pio.h

* add another assert

* minor clarifications
2025-02-03 11:25:03 -06:00
Richard Hulme
d7f6582459
Declare platform.h functions with C linkage (#2218)
The platform.h headers for both RP2040 and RP2350 need 'extern "C"'
declarations when included from C++ code or 'rp2040_chip_version'
and 'rp2350_chip_version' won't be found by the linker.
2025-02-02 11:44:17 -06:00