Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial support for rp2350 chips #138

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KevinOConnor
Copy link
Contributor

This PR resynchronizes the src/rp2040/ directory with the latest Klipper code. Notably, this adds support for rp2350 chips to Katapult.

This is a fairly large change mostly because of subtle differences between the previous Katapult rp2040 code and the Klipper rp2040 code. Notably:

  • rp2350 support.
  • The previous "execute from ram" Katapult implementation has been replaced with the Klipper "execute from ram" code.
  • The pico-sdk has been updated to v2.0.0 .
  • The can2040 code has been updated to the latest version (needed for pico-sdk v2.0.0).
  • The USB code will now implement double buffering (as that was recently added to the Klipper code).
  • If using UART, one can select several different UART pins during "make menuconfig".
  • Support for RP2040_ADD_BOOT_SIGNATURE was disabled. The scripts/uf2_append_boot_signature.py is still present, but it can't be enabled from "make menuconfig". I'm not sure what this code does, so I don't know how to test it (in particular on the rp2350 chips).

Note "enter bootloader on rapid double click of reset" support does not work on the rp2350 chips. It seems like these chips disable power to the SRAM0 and SRAM1 blocks when the RUN pin is pulled low, and thus codes written to the "bootup_code" address do not persist upon tapping the reset button. These memory based codes do persist across a normal armcm software reset, so entering the bootloader and starting the application do work. The rp2040 continues to support "entry via double click reset".

It may be possible to support "enter via reset double click" on the rp2350 by reconfiguring the chip power registers. It may also be possible to support it using the chip's own CHIP_RESET.DOUBLE_TAP mechanism. In either case, more investigation will be needed; it can be added in a follow up PR.

I've performed basic tests with this code on an rp2350 chip in USBSERIAL mode. I have also verified the code continues to run on an rp2040 chip (also tested in USBSERIAL mode).

@sh83 - FYI.

-Kevin

…hips

Synchronize with the latest Klipper code.  This pulls in the latest
lib/ files (needed to use the pico-sdk v2.0.0 version).  It updates to
latest can2040 code (needed for pico-sdk v2.0.0 support).  It
implements USB double buffering (as is now done in Klipper).  It adds
in support for additional UART pins (as is now done in Klipper).  It
adds support for rp2350 chips.

This replaces the execute in ram code previously implemented in
Katapult with the execute in ram code that is now standard in Klipper.

Signed-off-by: Kevin O'Connor <[email protected]>
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.

1 participant