Repository navigation
feat(rp2040): 5 kHz stepping, hardware info, SSD1306 display, CI coverage + TMC hold-current fix #309
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
Merged
Merged
feat(rp2040): 5 kHz stepping, hardware info, SSD1306 display, CI coverage + TMC hold-current fix #309
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
67284f7
feat(build): add RP2040 board plumbing
ClutchplateDude 4107efb
fix(config): define end-switch backslew constants unconditionally
ClutchplateDude ba77e38
feat(rp2040): add platform runtime support
ClutchplateDude 850a4b9
feat(rp2040): add JackW01 and SKR Pico boards
ClutchplateDude 7356649
ci(rp2040): add boards to build matrix
ClutchplateDude ef906c9
fix(rp2040): report RP2040 in getMountHardwareInfo
ClutchplateDude 8a01003
fix(logging): write each log line with a single serial write
ClutchplateDude 4a3b84e
fix(rp2040): harden USB CDC serial handling
ClutchplateDude 5d3e0d2
feat(rp2040): raise stepper servicing rate to 5 kHz
ClutchplateDude 32cde8d
fix(rp2040): bound the CDC console wait so headless boots proceed
ClutchplateDude 3c3405f
fix(mount): stop overriding TMC2209 hold current to full scale
ClutchplateDude bdc2b8e
fix(rp2040): always bypass CDC flow control so DTR-less hosts get rep…
ClutchplateDude 471937f
Merge develop (squashed #298) into rp2040-support
ClutchplateDude a7e8886
fix(testmenu): compare action instead of assigning in PassthroughCmd …
ClutchplateDude afc5d3e
ci(rp2040): restrict RA/DEC matrix driver types to TMC2209 UART
ClutchplateDude 6e32af4
docs(rp2040): add wiring guide for supported peripherals
ClutchplateDude 5c9a1ab
fix(rp2040): correct SKR Pico info display pins (GP0/GP1, not GP20/21)
ClutchplateDude da87b68
docs(rp2040): drop DIAG pin references; state StallGuard autohome uns…
ClutchplateDude 5db9a4d
fix(config): drop StallGuard DIAG pragma messages
ClutchplateDude 9a48e9d
Changed debug level test to inequality
ClutchplateDude ca166d8
style: apply clang-format fixes
openastrotech-bot d442e01
fix(display): draw logo header on every console frame; uppercase FW v…
ClutchplateDude 77770fc
feat(rp2040): default USB serial speed to 115200
ClutchplateDude 6bcc75d
Sample Pico config for OAM
ClutchplateDude 749329a
style: apply clang-format fixes
openastrotech-bot 83f08ea
Merge branch 'develop' into rp2040-support
ClutchplateDude 331c20e
docs(rp2040): clarify FreeRTOS mention in timer comment
ClutchplateDude baab6f6
fix(rp2040): address PR review feedback
ClutchplateDude File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,143 @@ | ||
| /** | ||
| * @brief Bench configuration for the BTT SKR Pico v1.0 RP2040 board. | ||
| * | ||
| * Personal local config (gitignored). Based on | ||
| * Configuration_local_examples/Configuration_local_rp2040_skr_pico.hpp, | ||
| * adapted for the bench hardware: | ||
| * - Hall homing sensors on RA (X-STOP GPIO4) AND DEC (Y-STOP GPIO3) | ||
| * - DEC endstops on Z-STOP (GPIO25, down) and E-STOP (GPIO16, up) | ||
| * - SSD1306 info display on I2C0, GP0/GP1 on the left-side header | ||
| * - GPS disabled for the bench | ||
| * | ||
| * All other pin assignments are in boards/RP2040_SKR_PICO/pins_RP2040_SKR_PICO.hpp. | ||
| */ | ||
| #pragma once | ||
|
|
||
| // ── Board ───────────────────────────────────────────────────────────────────── | ||
| #define BOARD BOARD_RP2040_SKR_PICO | ||
| #define OAM | ||
| #define TEST_VERIFY_MODE 0 | ||
|
|
||
| // ── Hemisphere ──────────────────────────────────────────────────────────────── | ||
| #define NORTHERN_HEMISPHERE 1 | ||
|
|
||
| // ── Display ──────────────────────────────────────────────────────────────────── | ||
| // No LCD menu display (RP2040 phase 1); SSD1306 128x64 info display on I2C0. | ||
| // GP0/GP1 on the left-side header (IO0/IO1/GND/5V) - the only header-accessible | ||
| // I2C0 pair on the SKR Pico. Shares pins with the default GPS wiring, so | ||
| // USE_GPS must stay 0 while the display is enabled. | ||
| // (GP20/GP21 are MOSFET-gate-only nets on this board - HB/FAN/Laser outputs, | ||
| // never exposed as raw GPIO; wiring I2C there hangs the bus and the firmware.) | ||
| #define DISPLAY_TYPE DISPLAY_TYPE_NONE | ||
| #define INFO_DISPLAY_TYPE INFO_DISPLAY_TYPE_I2C_SSD1306_128x64 | ||
| #define INFO_DISPLAY_I2C_ADDRESS 0x3C | ||
| #define INFO_DISPLAY_I2C_SDA_PIN 0 // GP0 (I2C0 SDA, left header IO0) | ||
| #define INFO_DISPLAY_I2C_SCL_PIN 1 // GP1 (I2C0 SCL, left header IO1) | ||
| #define INFO_DISPLAY_UPSIDE_DOWN 1 | ||
| #define INFO_DISPLAY_MIRRORED 0 | ||
|
|
||
| // ── Stepper control interval ───────────────────────────────────────────────── | ||
| // 5 kHz is the RP2040 default (see Configuration_adv.hpp) and the bench-verified | ||
| // rate. The RP2040 can also handle 10 kHz if you need faster step generation | ||
| // (set 0.1f), but that is not part of the verified baseline. | ||
| #define STEPPER_CONTROL_INTERVAL_MS 0.2f // 5 kHz | ||
|
|
||
| // ── Stepper motor types ─────────────────────────────────────────────────────── | ||
| #define RA_STEPPER_TYPE STEPPER_TYPE_ENABLED | ||
| #define DEC_STEPPER_TYPE STEPPER_TYPE_ENABLED | ||
| #define AZ_STEPPER_TYPE STEPPER_TYPE_ENABLED | ||
| #define ALT_STEPPER_TYPE STEPPER_TYPE_ENABLED | ||
|
|
||
| // ── Stepper driver types ────────────────────────────────────────────────────── | ||
| #define RA_DRIVER_TYPE DRIVER_TYPE_TMC2209_UART | ||
| #define DEC_DRIVER_TYPE DRIVER_TYPE_TMC2209_UART | ||
| #define AZ_DRIVER_TYPE DRIVER_TYPE_TMC2209_UART | ||
| #define ALT_DRIVER_TYPE DRIVER_TYPE_TMC2209_UART | ||
|
|
||
| // ── RA Settings ─────────────────────────────────────────────────────────────── | ||
| #define RA_SLEW_MICROSTEPPING 16 // µsteps used while slewing RA | ||
| #define RA_TRACKING_MICROSTEPPING 256 // µsteps used for sidereal tracking | ||
| #define RA_STEPPER_SPEED 8000 // steps/s. If SPEED and ACCELERATION numbers are the same, the spool up to full speed takes one second. | ||
| #define RA_STEPPER_ACCELERATION 8000 // steps/s/s | ||
| #define RA_MOTOR_CURRENT_RATING 1000 // mA | ||
| #define RA_OPERATING_CURRENT_SETTING 75 // % | ||
| #define RA_WHEEL_CIRCUMFERENCE 1130.97f // 360mm diam | ||
| #define RA_PULLEY_TEETH 16 | ||
| #define RA_STEPPER_SPR (400 * 9) // change to (200 * 9) for 1.8° stepper | ||
| #define RA_LIMIT_LEFT 6.0f | ||
| #define RA_LIMIT_RIGHT 6.0f | ||
| #define RA_INVERT_DIR 1 | ||
|
|
||
| // ── DEC settings ──────────────────────────────────────────────────────────── | ||
| #define DEC_SLEW_MICROSTEPPING 16 // µsteps used while slewing DEC | ||
| #define DEC_GUIDE_MICROSTEPPING 256 // µsteps used for guide pulses | ||
| #define DEC_STEPPER_SPEED 8000 // steps/s. If SPEED and ACCELERATION numbers are the same, the spool up to full speed takes one second. | ||
| #define DEC_STEPPER_ACCELERATION 8000 // steps/s/s | ||
| #define DEC_MOTOR_CURRENT_RATING 1000 // mA | ||
| #define DEC_OPERATING_CURRENT_SETTING 75 // % | ||
| #define DEC_WHEEL_CIRCUMFERENCE 816.814f | ||
| #define DEC_PULLEY_TEETH 16 | ||
| #define DEC_STEPPER_SPR (400 * 9) // change to (200 * 9) for 1.8° stepper | ||
| #define DEC_LIMIT_UP 130 | ||
| #define DEC_LIMIT_DOWN 130 | ||
| #define DEC_INVERT_DIR 1 | ||
|
|
||
| // ── StealthChop (silent mode) ───────────────────────────────────────────────── | ||
| #define RA_UART_STEALTH_MODE 1 | ||
| #define DEC_UART_STEALTH_MODE 1 | ||
|
|
||
| // ── AZIMUTH definitions ────────────────────────────────────────────────────── | ||
| #define AZ_MICROSTEPPING 16 | ||
| #define AZ_STEPPER_SPEED 2500 | ||
| #define AZ_STEPPER_ACCELERATION 1250 | ||
| #define AZ_MOTOR_CURRENT_RATING 2000 // mA | ||
| #define AZ_OPERATING_CURRENT_SETTING 80 // % | ||
| #define AZ_STEPPER_SPR 400 | ||
| #define AZ_ALWAYS_ON 1 | ||
| #define AZ_MOTOR_HOLD_SETTING 15 | ||
| #define AZ_PULLEY_TEETH 20 | ||
| #define AZ_ROD_PITCH 1.0f // mm per full rev of stepper | ||
| #define AZ_CIRCUMFERENCE (115 * 2 * 3.1415927) | ||
| #define AZIMUTH_STEPS_PER_REV (AZ_CIRCUMFERENCE / AZ_ROD_PITCH * AZ_STEPPER_SPR * AZ_MICROSTEPPING) // Steps needed to turn AZ 360deg | ||
| #define AZ_INVERT_DIR 1 | ||
|
|
||
| // ── ALTITUDE definitions ───────────────────────────────────────────────────── | ||
| #define ALT_MICROSTEPPING 32 | ||
| #define ALT_STEPPER_SPEED 2500 | ||
| #define ALT_STEPPER_ACCELERATION 1250 | ||
| #define ALT_MOTOR_CURRENT_RATING 1000 // mA | ||
| #define ALT_OPERATING_CURRENT_SETTING 70 // % | ||
| #define ALT_STEPPER_SPR 400 | ||
| #define ALT_INVERT_DIR 0 | ||
| #define ALT_ALWAYS_ON 0 | ||
|
|
||
| // ── Hall sensor auto-homing (RA and DEC) ────────────────────────────────────── | ||
| // RA sensor on X-STOP (GPIO4 = RA_DIAG_PIN), DEC sensor on Y-STOP (GPIO3 = DEC_DIAG_PIN). | ||
| // Active state LOW: sensor pulls the GPIO LOW when the magnet is present. | ||
| #define USE_HALL_SENSOR_RA_AUTOHOME 0 | ||
| #define RA_HOMING_SENSOR_PIN 4 // GPIO4 = X-STOP | ||
| #define RA_HOMING_SENSOR_ACTIVE_STATE LOW | ||
|
|
||
| #define USE_HALL_SENSOR_DEC_AUTOHOME 0 | ||
| #define DEC_HOMING_SENSOR_PIN 3 // GPIO3 = Y-STOP | ||
| #define DEC_HOMING_SENSOR_ACTIVE_STATE LOW | ||
|
|
||
| // ── DEC endstops ────────────────────────────────────────────────────────────── | ||
| // Wired to the two remaining endstop inputs on the SKR Pico. | ||
| #define USE_DEC_END_SWITCH 0 | ||
| #define DEC_ENDSWITCH_DOWN_SENSOR_PIN 25 // GPIO25 = Z-STOP | ||
| #define DEC_ENDSWITCH_UP_SENSOR_PIN 16 // GPIO16 = E-STOP | ||
| #define DEC_END_SWITCH_ACTIVE_STATE LOW | ||
|
|
||
| // ── GPS ─────────────────────────────────────────────────────────────────────── | ||
| // Disabled for the bench (no module connected). NOTE: GPS shares GP0/GP1 with | ||
| // the info display on this board - only one of the two can be enabled. | ||
| #define USE_GPS 0 | ||
|
|
||
| // ── FAN (disabled for now)─────────────────────────────────────────────────────────────────────── | ||
| // #define RP2040_FAN1_POWER_PERCENT 60 | ||
|
|
||
| // Track immediately after boot | ||
| #define TRACK_ON_BOOT 0 | ||
|
|
||
| #define DEBUG_LEVEL (DEBUG_NONE) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.