PiPico -> Unknown spi_bus 'spi0a'

Hello :slight_smile: I need some help getting the SPI Bus on the a Pi Pico to work.
By now I tried a bunch of different ADXL345 boards and Picos always with the same result.

I am trying to follow this guide: Reddit - Dive into anything

When I use hardware SPI

spi_bus: spi0a

Klipper crashes with

Unknown spi_bus ‘spi0a’

When I try software SPI

cs_pin: pico:gpio1
spi_software_sclk_pin: pico:gpio2
spi_software_mosi_pin: pico:gpio3
spi_software_miso_pin: pico:gpio0

or

cs_pin: pico:gpio1
spi_software_sclk_pin: gpio2
spi_software_mosi_pin: gpio3
spi_software_miso_pin: gpio0

Klipper fails with

adxl345: spi pins must be on same mcu

When I do not define the SPI Bus at all, Klipper can not connect to the ADXL345 board.

By now I tried two genuine Adafruit boards, a bunch of different clones in changing combinations with 4 different PiPicos.

When I add the Pico as a MCU it works, for example I can configure the mcu thermal sensor without an issue and it reports realistic values.

When I test the ADXL boards using an Arduino UNO with the Sketch provided by Adafruit they work in SPI and I2C mode … I am somewhat confident to rule out a hardware issue.

Klipper is up to date, the Pico is running v0.10.0-227-gbabb067b

Did anybody experience something similar or has an idea on how I could get this to work?

Kind regards!

Did you follow Measuring Resonances - Klipper documentation, especially

[mcu rpi]
serial: /tmp/klipper_host_mcu

[adxl345]
cs_pin: rpi:None

[resonance_tester]
accel_chip: adxl345

This doesn’t apply. He’s connecting the adxl345 to the Pico, not the Pi. I would need to see a log of the issue. Using spi0a should be correct as long as the MCU is configured properly and connected to Klipper.

Hey Jake,

sure, here you go:

Starting Klippy...
Args: ['/home/pi/klipper/klippy/klippy.py', '/opt/klipper_fw/config/printer.cfg', '-I', '/tmp/printer', '-l', '/home/pi/klipper_logs/klippy.log', '-a', '/tmp/klippy_uds']
Git version: 'v0.10.0-227-gbabb067b'
CPU: 4 core ARMv7 Processor rev 3 (v7l)
Python: '2.7.16 (default, Oct 10 2019, 22:02:15) \n[GCC 8.3.0]'
Start printer at Thu Jan 13 19:59:05 2022 (1642100345.5 5982.0)
===== Config file =====
[pause_resume]

[display_status]

[gcode_macro CANCEL_PRINT]
rename_existing = BASE_CANCEL_PRINT
gcode =
	LED_RED
	TURN_OFF_HEATERS
	CLEAR_PAUSE
	SDCARD_RESET_FILE
	BASE_CANCEL_PRINT
	M140 S0 ; set bed temp
	M190 S0 ; wait for bed temp
	SET_FAN_SPEED FAN=exhaust_fan SPEED=1
	G1 X175 Y350

[gcode_macro PAUSE]
rename_existing = BASE_PAUSE
variable_extrude = 1.0
gcode =
	LED_BLUE
	{% set E = printer["gcode_macro PAUSE"].extrude|float %}
	{% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
	{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
	{% set max_z = printer.toolhead.axis_maximum.z|float %}
	{% set act_z = printer.toolhead.position.z|float %}
	{% if act_z < (max_z - 2.0) %}
	{% set z_safe = 2.0 %}
	{% else %}
	{% set z_safe = max_z - act_z %}
	{% endif %}
	SAVE_GCODE_STATE NAME=PAUSE_state
	BASE_PAUSE
	G91
	G1 E-{E} F2100
	G1 Z{z_safe} F900
	G90
	G1 X175 Y350 F6000
	LED_PINK

[gcode_macro RESUME]
rename_existing = BASE_RESUME
gcode =
	{% set E = printer["gcode_macro PAUSE"].extrude|float %}
	G91
	G1 E{E} F2100
	RESTORE_GCODE_STATE NAME=PAUSE_state
	BASE_RESUME
	LED_WHITE

[gcode_macro BRUSH]
description = Cleaning the nozzle
variable_brush_left_edge = 78
variable_brush_right_edge = 118
gcode =
	LED_PINK
	G90
	G1 X78 Y355 Z5
	G1 Z3
	G1 X118 F5000
	G1 Y354 F1500
	G1 X78  F5000
	G1 Y353 F1500
	G1 X130  F5000
	G1 Z10

[gcode_macro LED_RED]
gcode =
	SET_PIN PIN=caselight_red VALUE=1
	SET_PIN PIN=caselight_white VALUE=0
	SET_PIN PIN=caselight_green VALUE=0
	SET_PIN PIN=caselight_blue VALUE=0

[gcode_macro LED_AMBER]
gcode =
	SET_PIN PIN=caselight_green VALUE=1
	SET_PIN PIN=caselight_white VALUE=0
	SET_PIN PIN=caselight_red VALUE=1
	SET_PIN PIN=caselight_blue VALUE=0

[gcode_macro LED_GREEN]
gcode =
	SET_PIN PIN=caselight_green VALUE=1
	SET_PIN PIN=caselight_white VALUE=0
	SET_PIN PIN=caselight_red VALUE=0
	SET_PIN PIN=caselight_blue VALUE=0

[gcode_macro LED_TURQUOISE]
gcode =
	SET_PIN PIN=caselight_green VALUE=1
	SET_PIN PIN=caselight_white VALUE=0
	SET_PIN PIN=caselight_red VALUE=0
	SET_PIN PIN=caselight_blue VALUE=1

[gcode_macro LED_BLUE]
gcode =
	SET_PIN PIN=caselight_blue VALUE=1
	SET_PIN PIN=caselight_white VALUE=0
	SET_PIN PIN=caselight_red VALUE=0
	SET_PIN PIN=caselight_green VALUE=0

[gcode_macro LED_PINK]
gcode =
	SET_PIN PIN=caselight_blue VALUE=1
	SET_PIN PIN=caselight_white VALUE=0
	SET_PIN PIN=caselight_red VALUE=1
	SET_PIN PIN=caselight_green VALUE=0

[gcode_macro LED_WHITE]
gcode =
	SET_PIN PIN=caselight_white VALUE=1
	SET_PIN PIN=caselight_red VALUE=0
	SET_PIN PIN=caselight_green VALUE=0
	SET_PIN PIN=caselight_blue VALUE=0

[gcode_macro PRINT_LIGHT]
gcode =
	SET_PIN PIN=caselight_white VALUE=1
	SET_PIN PIN=caselight_red VALUE=0
	SET_PIN PIN=caselight_green VALUE=0
	SET_PIN PIN=caselight_blue VALUE=0

[gcode_macro LED_OFF]
gcode =
	SET_PIN PIN=caselight_white VALUE=0
	SET_PIN PIN=caselight_red VALUE=0
	SET_PIN PIN=caselight_green VALUE=0
	SET_PIN PIN=caselight_blue VALUE=0

[output_pin caselight_red]
pin = PB1
pwm = true
shutdown_value = 0
value = 0
cycle_time = 0.01

[output_pin caselight_green]
pin = PD14
pwm = true
shutdown_value = 0
value = 0
cycle_time = 0.01

[output_pin caselight_blue]
pin = PB0
pwm = true
shutdown_value = 0
value = 0
cycle_time = 0.01

[output_pin caselight_white]
pin = 1:PB0
pwm = true
shutdown_value = 0
value = 0
cycle_time = 0.01

[gcode_macro PRINT_START]
description = Pre-Print procedure
gcode =
	{% set BED_TEMP = params.BED_TEMP|default(60)|float %}
	{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(190)|float %}
	{% set HEAT_SOAK = params.HEAT_SOAK|default(900000)|float %}
	LED_AMBER
	TURN_OFF_HEATERS
	SET_FAN_SPEED FAN=exhaust_fan SPEED=0
	SET_FAN_SPEED FAN=fan SPEED=0
	M140 S{BED_TEMP}
	{action_respond_info("Heating Bed")}
	M190 S{BED_TEMP}
	G90
	G28
	BED_MESH_CLEAR
	QUAD_GANTRY_LEVEL
	G1 X175 y 200 Z70
	{action_respond_info("Heat soak")}
	G4   P{HEAT_SOAK}
	{action_respond_info("Heat soak time complete")}
	M104 S{EXTRUDER_TEMP}
	M109 S{EXTRUDER_TEMP}
	{action_respond_info("Waiting for nozzle to reach temperature")}
	BRUSH
	CALIBRATE_Z
	BED_MESH_PROFILE LOAD=default
	Dock_Probe

[mcu pico]
serial = /dev/serial/by-id/usb-Klipper_rp2040_E6612483CB40A321-if00

[adxl345]
cs_pin = rpi:None
spi_bus = spi0a

[temperature_sensor Pico]
sensor_type = temperature_mcu
sensor_mcu = pico

[resonance_tester]
accel_chip = adxl345
probe_points = 175,175,30

[mcu 1]
serial = /dev/serial/by-id/usb-Klipper_stm32f407xx_42001B000250533754323420-if00

[mcu]
serial = /dev/serial/by-id/usb-Klipper_stm32f407xx_370034000D50533754323420-if00

[mcu rpi]
serial = /tmp/klipper_host_mcu

[printer]
kinematics = corexy
max_velocity = 10000
max_accel = 10000
max_accel_to_decel = 10000
max_z_velocity = 40
max_z_accel = 400
square_corner_velocity = 5.0

[stepper_y]
step_pin = PD13
dir_pin = PG9
enable_pin = !PF0
rotation_distance = 40
microsteps = 16
full_steps_per_rotation = 400
endstop_pin = !PE10
position_min = 0
position_endstop = 353
position_max = 355
homing_speed = 25
homing_retract_dist = 30
homing_positive_dir = true

[tmc2209 stepper_y]
uart_pin = PD6
interpolate = True
run_current = 1
hold_current = 0.3
sense_resistor = 0.110

[stepper_x]
step_pin = PD15
dir_pin = PE7
enable_pin = !PA3
rotation_distance = 40
microsteps = 16
full_steps_per_rotation = 400
endstop_pin = !PE15
position_min = 0
position_endstop = 343
position_max = 350
homing_speed = 25
homing_retract_dist = 30
homing_positive_dir = true

[tmc2209 stepper_x]
uart_pin = PD1
interpolate = True
run_current = 1
hold_current = 0.3
sense_resistor = 0.110

[stepper_z]
step_pin = PE9
dir_pin = !PF1
enable_pin = !PF2
rotation_distance = 40
gear_ratio = 80:16
microsteps = 16
endstop_pin = PG8
position_endstop = 0.89
position_min = -3
position_max = 500

[tmc2209 stepper_z]
uart_pin = PC13
interpolate = true
run_current = 1
hold_current = 0.8
sense_resistor = 0.110

[stepper_z3]
step_pin = PE11
dir_pin = PE8
enable_pin = !PD7
rotation_distance = 40
gear_ratio = 80:16
microsteps = 16

[tmc2209 stepper_z3]
uart_pin = PE3
interpolate = true
run_current = 1
hold_current = 0.8
sense_resistor = 0.110

[stepper_z2]
step_pin = PE13
dir_pin = !PC2
enable_pin = !PC0
rotation_distance = 40
gear_ratio = 80:16
microsteps = 16

[tmc2209 stepper_z2]
uart_pin = PE1
interpolate = true
run_current = 1
hold_current = 0.80
sense_resistor = 0.110

[stepper_z1]
step_pin = PE14
dir_pin = PA0
enable_pin = !PC3
rotation_distance = 40
gear_ratio = 80:16
microsteps = 16

[tmc2209 stepper_z1]
uart_pin = PD4
interpolate = true
run_current = 1
hold_current = 0.80
sense_resistor = 0.110

[extruder]
step_pin = 1:PE9
dir_pin = 1:PF1
enable_pin = !1:PF2
rotation_distance = 32.3086084
gear_ratio = 7.5:1
microsteps = 16
full_steps_per_rotation = 200
nozzle_diameter = 0.400
filament_diameter = 1.75
heater_pin = 1:PB1
sensor_type = ATC Semitec 104GT-2
sensor_pin = 1:PF3
min_temp = 0
max_temp = 300
max_power = 1.0
min_extrude_temp = 170
max_extrude_only_velocity = 60
max_extrude_only_accel = 600
max_extrude_only_distance = 150
pressure_advance_smooth_time = 0.073
max_extrude_cross_section = 2
control = pid
pid_kp = 36.282
pid_ki = 1.935
pid_kd = 170.071

[tmc2209 extruder]
uart_pin = 1:PC13
interpolate = true
run_current = 0.400
hold_current = 0.1
sense_resistor = 0.110

[heater_bed]
heater_pin = 1:PD12
sensor_type = NTC 100K MGB18-104F39050L32
sensor_pin = 1:PF4
max_power = 1
min_temp = -255
max_temp = 255
control = pid
pid_kp = 53.595
pid_ki = 1.553
pid_kd = 462.255

[probe]
pin = ^PG5
x_offset = 0
y_offset = 17.5
z_offset = 6.42
speed = 2
samples = 4
samples_result = median
sample_retract_dist = 5
samples_tolerance = 0.01
samples_tolerance_retries = 10

[bed_mesh]
mesh_min = 20,20
mesh_max = 330,330
fade_start = 0.6
fade_end = 10.0
algorithm = bicubic
speed = 120
horizontal_move_z = 10
probe_count = 15,15
relative_reference_index = 113

[heater_fan hotend_fan]
pin = 1:PE5
max_power = 1.0
kick_start_time = 0.5
heater = extruder
heater_temp = 30.0

[fan]
pin = 1:PC8
kick_start_time = 0.5
off_below = 0.10

[temperature_sensor Raspberry_PI]
sensor_type = temperature_host
min_temp = 10
max_temp = 100

[temperature_sensor SKR1]
sensor_type = temperature_mcu
sensor_mcu = mcu
min_temp = 0
max_temp = 100

[temperature_sensor SKR2]
sensor_type = temperature_mcu
sensor_mcu = 1
min_temp = 0
max_temp = 100

[temperature_fan Electronics]
pin = PC8
kick_start_time = 0.5
target_temp = 45.0
min_temp = 0
max_temp = 80
sensor_type = PT1000
sensor_pin = PF3
control = watermark

[heater_fan Electronics_2]
pin = PE5
kick_start_time = 0.5
heater = heater_bed
heater_temp = 45.0

[idle_timeout]
timeout = 1800

[quad_gantry_level]
max_adjust = 10
horizontal_move_z = 10
retries = 8
retry_tolerance = 0.01
gantry_corners =
	-60,-10
	410,420
points =
	50,50
	50,275
	300,275
	300,50

[temperature_sensor Ambient]
sensor_type = PT1000
sensor_pin = 1:PF5

[board_pins]
aliases =
	EXP1_1=PG4, EXP1_3=PD11, EXP1_5=PG2, EXP1_7=PG6, EXP1_9=<GND>,
	EXP1_2=PA8, EXP1_4=PD10, EXP1_6=PG3, EXP1_8=PG7, EXP1_10=<5V>,
	EXP2_1=PB14, EXP2_3=PG10, EXP2_5=PF11, EXP2_7=PF12,  EXP2_9=<GND>,
	EXP2_2=PB13, EXP2_4=PB12, EXP2_6=PB15, EXP2_8=<RST>, EXP2_10=PF13

[display]
lcd_type = uc1701
cs_pin = EXP1_3
a0_pin = EXP1_4
rst_pin = EXP1_5
contrast = 63
encoder_pins = ^EXP2_5, ^EXP2_3
click_pin = ^!EXP1_2

[output_pin beeper]
pin = EXP1_1

[neopixel fysetc_mini12864]
pin = EXP1_6
chain_count = 30
color_order = RGB
initial_red = 0.6
initial_green = 0.6
initial_blue = 0.6

[delayed_gcode setdisplayneopixel]
initial_duration = 1
gcode =
	SET_LED LED=fysetc_mini12864 RED=0.65 GREEN=0.95 BLUE=0.95

[delayed_gcode power_up]
initial_duration = 1
gcode =
	LED_WHITE

[gcode_macro G32]
gcode =
	BED_MESH_CLEAR
	G28
	G1 Z10
	QUAD_GANTRY_LEVEL
	G28 Z
	G1 Z15
	BED_MESH_PROFILE LOAD=default

[gcode_macro Maitenance]
gcode =
	G28
	G1 Z15
	G0 X175 Y50 Z250

[gcode_macro Update_Mesh]
gcode =
	LED_BLUE
	G28
	G1 Z20
	G1 X175 Y300 Z100
	LED_AMBER
	M140 S70  ; set bed temp
	M104 S150 ; set extruder temp
	M109 S150 ; set extruder temp
	M190 S70  ; wait for extruder temp
	LED_BLUE
	G28 z
	G1 Z20
	G1 X175 Y300 Z100 F6000
	QUAD_GANTRY_LEVEL
	BED_MESH_CLEAR
	BED_MESH_CALIBRATE
	G1 X175 Y300 Z100 F6000
	SAVE_CONFIG
	LED_OFF

[gcode_macro PRINT_END]
gcode =
	M400                           ; wait for buffer to clear
	LED_BLUE
	G92 E0                         ; zero the extruder
	G1 E-0.4 F3600                ; retract filament
	G91                            ; relative positioning
	G0 Z10.00 X20.0 Y20.0 F20000    ; move nozzle to remove stringing
	TURN_OFF_HEATERS
	M107                           ; turn off fan
	G90                            ; absolute positioning
	G0  X175 Y350 F3600            ; park nozzle at rear
	SET_FAN_SPEED FAN=exhaust_fan SPEED=1
	BED_MESH_CLEAR
	LED_GREEN
	G4 P4000
	SET_FAN_SPEED FAN=exhaust_fan SPEED=0
	LED_WHITE

[virtual_sdcard]
path = /opt/gcodes

[bed_mesh default]
version = 1
points =
	-0.077500, -0.058750, -0.025000, 0.003750, 0.060000, 0.057500, 0.063750, 0.053750, 0.048750, 0.047500, 0.025000, 0.011250, -0.008750, -0.036250, -0.058750
	-0.081250, -0.047500, -0.032500, -0.007500, 0.008750, 0.023750, 0.026250, 0.041250, 0.025000, 0.023750, 0.003750, -0.015000, -0.040000, -0.058750, -0.083750
	-0.098750, -0.085000, -0.036250, -0.026250, -0.028750, -0.015000, -0.000000, 0.008750, -0.002500, -0.003750, -0.031250, -0.033750, -0.058750, -0.087500, -0.121250
	-0.160000, -0.123750, -0.110000, -0.081250, -0.071250, -0.033750, -0.028750, -0.032500, -0.028750, -0.031250, -0.041250, -0.062500, -0.086250, -0.101250, -0.133750
	-0.185000, -0.128750, -0.121250, -0.085000, -0.063750, -0.028750, 0.008750, -0.021250, -0.023750, -0.028750, -0.041250, -0.061250, -0.078750, -0.100000, -0.121250
	-0.163750, -0.121250, -0.101250, -0.073750, -0.053750, -0.033750, -0.006250, -0.022500, -0.033750, -0.036250, -0.066250, -0.073750, -0.088750, -0.125000, -0.155000
	-0.171250, -0.098750, -0.111250, -0.088750, -0.062500, -0.032500, -0.013750, -0.016250, -0.031250, -0.046250, -0.070000, -0.083750, -0.101250, -0.131250, -0.165000
	-0.157500, -0.125000, -0.090000, -0.075000, -0.057500, -0.033750, 0.000000, -0.011250, -0.033750, -0.056250, -0.082500, -0.091250, -0.107500, -0.133750, -0.165000
	-0.158750, -0.121250, -0.096250, -0.088750, -0.066250, -0.033750, -0.015000, -0.008750, -0.035000, -0.056250, -0.056250, -0.063750, -0.091250, -0.121250, -0.146250
	-0.146250, -0.101250, -0.088750, -0.058750, -0.043750, -0.018750, -0.016250, -0.023750, -0.038750, -0.055000, -0.046250, -0.058750, -0.096250, -0.116250, -0.148750
	-0.142500, -0.096250, -0.082500, -0.052500, -0.038750, -0.018750, -0.008750, -0.007500, -0.028750, -0.046250, -0.063750, -0.080000, -0.068750, -0.096250, -0.136250
	-0.108750, -0.083750, -0.063750, -0.038750, -0.018750, 0.000000, 0.012500, -0.007500, -0.011250, -0.023750, -0.058750, -0.071250, -0.087500, -0.093750, -0.113750
	-0.098750, -0.073750, -0.048750, -0.031250, -0.017500, -0.007500, 0.006250, 0.013750, -0.003750, -0.016250, -0.025000, -0.048750, -0.051250, -0.053750, -0.098750
	-0.085000, -0.055000, -0.028750, 0.001250, -0.001250, 0.011250, 0.031250, 0.038750, 0.021250, 0.012500, 0.003750, -0.021250, -0.023750, -0.051250, -0.071250
	-0.071250, -0.041250, -0.011250, 0.008750, 0.013750, 0.018750, 0.031250, 0.033750, 0.026250, 0.018750, 0.022500, 0.005000, -0.012500, -0.023750, -0.063750
tension = 0.2
min_x = 20.0
algo = bicubic
y_count = 15
mesh_y_pps = 2
min_y = 20.0
x_count = 15
max_y = 329.96
mesh_x_pps = 2
max_x = 329.96
=======================
Extruder max_extrude_ratio=0.831503
mcu 'mcu': Starting serial connect
webhooks client 3041664136: New connection
webhooks client 3041664136: Client info {'program': 'Moonraker', 'version': 'v0.7.1-285-g505c1bf'}
mcu 'mcu': got {'#receive_time': 5983.402509563, u'next_clock': 712225408, u'oid': 27, u'value': 7606, '#name': u'analog_in_state', '#sent_time': 5983.393172433}
mcu 'mcu': got {'#receive_time': 5983.422518378, u'next_clock': 715585408, u'oid': 29, u'value': 6403, '#name': u'analog_in_state', '#sent_time': 5983.393172433}
Loaded MCU 'mcu' 94 commands (v0.10.0-113-gd4aee4f5 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1)
MCU 'mcu' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi2b=PI2,PI3,PI1 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_crystal=PH0,PH1 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=168000000 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi3=PB4,PB5,PB3 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 PWM_MAX=255 MCU=stm32f407xx
mcu 'pico': Starting serial connect
mcu 'mcu': got {'#receive_time': 5983.702549303, u'next_clock': 762625408, u'oid': 27, u'value': 7607, '#name': u'analog_in_state', '#sent_time': 5983.550889878}
mcu 'mcu': got {'#receive_time': 5983.722542563, u'next_clock': 765985408, u'oid': 29, u'value': 6404, '#name': u'analog_in_state', '#sent_time': 5983.550889878}
mcu 'mcu': got {'#receive_time': 5984.00273134, u'next_clock': 813025408, u'oid': 27, u'value': 7607, '#name': u'analog_in_state', '#sent_time': 5983.550889878}
mcu 'pico': got {u'count': 329, '#receive_time': 5984.004626414, u'sum': 30267, u'sumsq': 25800, '#name': u'stats', '#sent_time': 5984.003867766}
mcu 'mcu': got {'#receive_time': 5984.022724525, u'next_clock': 816385408, u'oid': 29, u'value': 6401, '#name': u'analog_in_state', '#sent_time': 5983.550889878}
mcu 'pico': got {'#receive_time': 5984.032643118, u'next_clock': 672251344, u'oid': 0, u'value': 7113, '#name': u'analog_in_state', '#sent_time': 5984.003867766}
Loaded MCU 'pico' 94 commands (v0.10.0-227-gbabb067b / gcc: (15:8-2019-q3-1+b1) 8.3.1 20190703 (release) [gcc-8-branch revision 273027] binutils: (2.34-4+rpi1+14) 2.34)
MCU 'pico' config: BUS_PINS_spi0a=gpio0,gpio3,gpio2 BUS_PINS_i2c0h=gpio28,gpio29 BUS_PINS_spi0c=gpio16,gpio19,gpio18 BUS_PINS_spi0d=gpio20,gpio23,gpio22 BUS_PINS_i2c0b=gpio4,gpio5 BUS_PINS_i2c0c=gpio8,gpio9 BUS_PINS_i2c1c=gpio10,gpio11 BUS_PINS_i2c0a=gpio0,gpio1 BUS_PINS_i2c0f=gpio20,gpio21 BUS_PINS_i2c0g=gpio24,gpio25 BUS_PINS_i2c1g=gpio26,gpio27 BUS_PINS_i2c0e=gpio16,gpio17 BUS_PINS_i2c0d=gpio12,gpio13 BUS_PINS_i2c1e=gpio18,gpio19 BUS_PINS_i2c1f=gpio22,gpio23 BUS_PINS_spi1c=gpio24,gpio27,gpio26 BUS_PINS_spi1b=gpio12,gpio15,gpio14 BUS_PINS_spi1a=gpio8,gpio11,gpio10 STATS_SUMSQ_BASE=256 BUS_PINS_i2c1d=gpio14,gpio15 BUS_PINS_i2c1b=gpio6,gpio7 STEPPER_BOTH_EDGE=1 BUS_PINS_i2c1a=gpio2,gpio3 ADC_MAX=4095 PWM_MAX=255 BUS_PINS_spi0b=gpio4,gpio7,gpio6 MCU=rp2040 CLOCK_FREQ=12000000
mcu '1': Starting serial connect
mcu 'mcu': got {'#receive_time': 5984.302713933, u'next_clock': 863425408, u'oid': 27, u'value': 7608, '#name': u'analog_in_state', '#sent_time': 5983.550889878}
mcu 'mcu': got {'#receive_time': 5984.322662636, u'next_clock': 866785408, u'oid': 29, u'value': 6402, '#name': u'analog_in_state', '#sent_time': 5983.550889878}
mcu 'pico': got {'#receive_time': 5984.332643988, u'next_clock': 675851344, u'oid': 0, u'value': 7113, '#name': u'analog_in_state', '#sent_time': 5984.22117084}
mcu 'mcu': got {'#receive_time': 5984.602707229, u'next_clock': 913825408, u'oid': 27, u'value': 7605, '#name': u'analog_in_state', '#sent_time': 5984.535471358}
mcu 'mcu': got {'#receive_time': 5984.622709081, u'next_clock': 917185408, u'oid': 29, u'value': 6404, '#name': u'analog_in_state', '#sent_time': 5984.535471358}
mcu 'pico': got {'#receive_time': 5984.63262171, u'next_clock': 679451344, u'oid': 0, u'value': 7112, '#name': u'analog_in_state', '#sent_time': 5984.22117084}
mcu '1': got {'#receive_time': 5984.662451729, u'next_clock': 910354451, u'oid': 3, u'value': 31473, '#name': u'analog_in_state', '#sent_time': 5984.640744784}
mcu '1': got {'#receive_time': 5984.70247084, u'next_clock': 917074451, u'oid': 7, u'value': 7525, '#name': u'analog_in_state', '#sent_time': 5984.692616044}
mcu '1': got {'#receive_time': 5984.712414025, u'next_clock': 918754451, u'oid': 8, u'value': 6186, '#name': u'analog_in_state', '#sent_time': 5984.692616044}
mcu '1': got {'#receive_time': 5984.722486118, u'next_clock': 920434451, u'oid': 9, u'value': 31513, '#name': u'analog_in_state', '#sent_time': 5984.692616044}
Loaded MCU '1' 94 commands (v0.10.0-113-gd4aee4f5 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1)
MCU '1' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi2b=PI2,PI3,PI1 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_crystal=PH0,PH1 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=168000000 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi3=PB4,PB5,PB3 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 PWM_MAX=255 MCU=stm32f407xx
mcu 'rpi': Starting connect
mcu 'mcu': got {'#receive_time': 5984.902683192, u'next_clock': 964225408, u'oid': 27, u'value': 7606, '#name': u'analog_in_state', '#sent_time': 5984.535471358}
mcu 'mcu': got {'#receive_time': 5984.922698525, u'next_clock': 967585408, u'oid': 29, u'value': 6401, '#name': u'analog_in_state', '#sent_time': 5984.535471358}
mcu 'pico': got {'#receive_time': 5984.932665599, u'next_clock': 683051344, u'oid': 0, u'value': 7112, '#name': u'analog_in_state', '#sent_time': 5984.22117084}
mcu '1': got {'#receive_time': 5984.962463766, u'next_clock': 960754451, u'oid': 3, u'value': 31474, '#name': u'analog_in_state', '#sent_time': 5984.902439395}
mcu '1': got {'#receive_time': 5985.00247271, u'next_clock': 967474451, u'oid': 7, u'value': 7523, '#name': u'analog_in_state', '#sent_time': 5984.902439395}
mcu '1': got {'#receive_time': 5985.012369673, u'next_clock': 969154451, u'oid': 8, u'value': 6188, '#name': u'analog_in_state', '#sent_time': 5984.902439395}
mcu '1': got {'#receive_time': 5985.022395173, u'next_clock': 970834451, u'oid': 9, u'value': 31517, '#name': u'analog_in_state', '#sent_time': 5984.902439395}
mcu 'mcu': got {'#receive_time': 5985.202625191, u'next_clock': 1014625408, u'oid': 27, u'value': 7605, '#name': u'analog_in_state', '#sent_time': 5984.535471358}
mcu 'mcu': got {'#receive_time': 5985.222600802, u'next_clock': 1017985408, u'oid': 29, u'value': 6402, '#name': u'analog_in_state', '#sent_time': 5984.535471358}
mcu 'pico': got {'#receive_time': 5985.232612247, u'next_clock': 686651344, u'oid': 0, u'value': 7112, '#name': u'analog_in_state', '#sent_time': 5985.205864377}
mcu '1': got {'#receive_time': 5985.262353284, u'next_clock': 1011154451, u'oid': 3, u'value': 31475, '#name': u'analog_in_state', '#sent_time': 5984.902439395}
mcu '1': got {'#receive_time': 5985.30234208, u'next_clock': 1017874451, u'oid': 7, u'value': 7523, '#name': u'analog_in_state', '#sent_time': 5984.902439395}
mcu '1': got {'#receive_time': 5985.312330877, u'next_clock': 1019554451, u'oid': 8, u'value': 6188, '#name': u'analog_in_state', '#sent_time': 5984.902439395}
mcu '1': got {'#receive_time': 5985.322340488, u'next_clock': 1021234451, u'oid': 9, u'value': 31517, '#name': u'analog_in_state', '#sent_time': 5984.902439395}
Loaded MCU 'rpi' 101 commands (v0.10.0-113-gd4aee4f5 / gcc: (Raspbian 8.3.0-6+rpi1) 8.3.0 binutils: (GNU Binutils for Raspbian) 2.31.1)
MCU 'rpi' config: PCA9685_MAX=4096 ADC_MAX=4095 PWM_MAX=32768 CLOCK_FREQ=50000000 MCU=linux STATS_SUMSQ_BASE=256
mcu_temperature 'pico' nominal base=437.226612 slope=-1917.489831
mcu_temperature 'mcu' nominal base=-241.648352 slope=1200.000000
mcu_temperature '1' nominal base=-246.579926 slope=1217.843866
Configured MCU 'mcu' (1024 moves)
Configured MCU 'pico' (1024 moves)
Configured MCU '1' (1024 moves)
Config error
Traceback (most recent call last):
  File "/home/pi/klipper/klippy/klippy.py", line 162, in _connect
    cb()
  File "/home/pi/klipper/klippy/mcu.py", line 729, in _connect
    self._send_config(None)
  File "/home/pi/klipper/klippy/mcu.py", line 659, in _send_config
    cb()
  File "/home/pi/klipper/klippy/extras/bus.py", line 77, in build_config
    bus = resolve_bus_name(self.mcu, "spi_bus", self.bus)
  File "/home/pi/klipper/klippy/extras/bus.py", line 25, in resolve_bus_name
    raise ppins.error("Unknown %s '%s'" % (param, bus))
error: Unknown spi_bus 'spi0a'

I have a Pico and tested on my machine right now. Works as expected. My config.

[mcu pico]
serial: /dev/serial/by-id/usb-Klipper_rp2040_E6605481DB509336-if00

[adxl345]
spi_bus: spi0a
cs_pin: pico:gpio1

[resonance_tester]
accel_chip: adxl345
probe_points:
    125,125,20

You have the wrong CS pin in what you just posted

[adxl345]
cs_pin = rpi:None
spi_bus = spi0a

Aww f* me … thx! That was the input I needed!

Turns out I had the ADXL345 section defined twice! Once in the printers.cfg and then in an include. Apparently the last definition wins.

Cleaned up the config, it works now

Srsly, thank you! I spend the last few evenings trying to make that one work.

… and now I will go and smash my head against the table for a few minutes.

Yes, for future reference if something is defined twice, the last definition “wins”.

Seems a nice option. For future reference Raspberry Pi Pico + ADXL345: Portable resonance measurement