Skip to content

Conversation

earlephilhower
Copy link
Owner

Add support for the extra 16 GPIO pins in the menus and core.

@earlephilhower earlephilhower force-pushed the p2 branch 7 times, most recently from 319102c to cc9cb20 Compare September 9, 2024 22:51
@earlephilhower earlephilhower changed the title Add RP2350B generic support Add RP2350B generic/Pimoroni PGA2350 support Sep 9, 2024
@earlephilhower
Copy link
Owner Author

@NollKollTroll, this PR should make the GPIOs > 39 work for everything but PIO-based usage (i.e. no Tone(40) or SerialPIO(45, 46)). The PSRAM should also come up automatically w/the Pimoroni PGA2350. If you have a change, could you give this a try? I still haven't found my wirewrap pen to start futzing w/the PGA2350...

@NollKollTroll
Copy link

I am trying to get it working on my end, will have to learn how to insert the PR into my pulled source. Will be back when I have tested the fixes.

@NollKollTroll
Copy link

Failing to understand how to properly select/load the modified PR-code in the arduino-IDE, I finally managed to make a fake 4.0.2 in the .arduino15 tree that kinda works. Don't know what is my fault and what is the failings of the PR-code...

  • When selecting Pimoroni PGA2350, build fails with:
    cc1: fatal error: /home/adam/.arduino15/packages/rp2040/hardware/rp2040/4.0.2/boot2/rp2350/boot2_w25q64jv_4_padded_checksum.S: No such file or directory compilation terminated.

  • When selecting Generic RP2350 and adding #define RP2350_PSRAM_CS (47u) in generic_rp2350/pins_arduino.h, PSRAMTest.ino builds and executes correctly.

@NollKollTroll
Copy link

NollKollTroll commented Sep 10, 2024

Tried again, and seem to have installed a correctly updated 4.0.2 since I get new menu options, like PSRAM_CS.

Choosing Generic RP2350 and updating the different menu options, PSRAMTest.ino compiles and runs correctly.
Setting a faulty PSRAM_CS produces a faulty memory test as expected.
Any overclock of the core makes the PSRAM tests fail. Is the PSRAM-clock connected to the core clock?

Choosing Pimoroni PGA2350 fails in the same way:
cc1: fatal error: /home/adam/.arduino15/packages/rp2040/hardware/rp2040/4.0.2/boot2/rp2350/boot2_w25q64jv_4_padded_checksum.S: No such file or directory compilation terminated.

Add support for the extra 16 GPIO pins in the menus and core.
Clean up Generic RP2350 PSRAM ("none" is valid) and flash
(other than 16MB) options.
Add extra GPIO<->peripheral connections
Add Pimoroni PGA2350 RP2350B-based board
@earlephilhower
Copy link
Owner Author

Weird and reproducible on the boot2 failure. The Platform.IO build succeeds which really seems odd but the Arduino IDE doesn't. I any case, the latest push does fix that (tested). Thx!

@earlephilhower earlephilhower marked this pull request as ready for review September 10, 2024 19:37
@earlephilhower earlephilhower merged commit 76811d3 into master Sep 12, 2024
20 checks passed
schkovich added a commit to schkovich/arduino-pico that referenced this pull request May 24, 2025
When async_context_threadsafe_background_execute_sync() is invoked from the non‑owner core, the helper worker used to be queued as a async_when_pending_worker_t.
Under heavy IRQ load the “pending” flag could be lost, leaving the semaphore unreleased and the caller blocked indefinitely (issue earlephilhower#2433).

Changes
Replace the helper’s worker field with async_at_time_worker_t and adapt handle_sync_func_call() accordingly.
Queue the helper via async_context_add_at_time_worker_in_ms(..., 0) instead of the previous add_when_pending_worker/set_work_pending pair.
Drop the now‑unnecessary async_context_remove_when_pending_worker() call inside the handler; at‑time workers self‑remove after execution.
.gitignore: ignore .qodo workspace directory.
Impact
The execute‑sync path is now race‑free: the helper worker is guaranteed to run once, release the semaphore, and return the result to the caller, eliminating the sporadic deadlock observed in multicore scenarios.

Co‑authored‑by: Goran Miskovic <[email protected]> Fix contributed for raspberrypi/pico-sdk/issues/2433
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants