« first day (8 days earlier)      last day (22 days later) » 

4:09 AM
Now I am setting up Pico's uart0 and uart1 to config the two tmc2225 drivers. The first thing I always do is to do uart loopback, to make sure that the uart port and setup and initialized correctly. The test function and sample outputs are listed below.
# *** UART Test Functions ***

printProgramName()
testUartLoopBack(uartPortNum = 0, writeBytes = 'uart0 Hello World')
testUartLoopBack(uartPortNum = 1, writeBytes = 'uart1 Hello World')

# *** Sample output ***
'''
>>> %Run -c $EDITOR_CONTENT
*** Program Name = tmc2225test60.py   Programmer = tlfong01   Date = 2022feb17 ***

    Begin testUartLoopBack(), ...
      uartPortNum        = 0
        writeBytes       = uart0 Hello World
        readBytes        = b'uart0 Hello World'
    End   testUartLoopBack().
And the complete listing of the tmc2225 test program with the sample output is list below:
tmc2225test60.py complete listing and sample output penzu.com/p/2a15c22d
 
4:27 AM
tmc2225 uart config/diagnostics testing setup:
Now I am checking the wiring of the tmc2225 module, making sure the module has 1k resistor already connecting the mdoule's TxD and RxD pins.
 
 
2 hours later…
6:13 AM
Now You need to skim the following product sheet to understand why tmc2225 uart is so confusing.
BigTreeTech TMC2225 UART Stepper Motor - USS$8.85
https://fr.aliexpress.com/item/4001109316265.html?gatewayAdapt=glo2fra
Pay particular attention to the section with 3 figures, as shown below:
 
6:29 AM
What confuses everybody is the productsheet's naming of the two UART protocols as
UART Mode and Tx/Rx Mode
"UART Mode" is used when the MPU is write only, using one wire, the Tx wire to talk or broadcast all (can be as many as 4, 8, or 16, say) the tmc2225 modules at the same time, configuring all modules alike.
If the mpu wants to config different modules with different config, or wants to read the status (diagnostics) of an individual module, address by the m1, m1 hardware pins for up to 4 modules (or more than 4 with external address decoding hardware), using both Tx and Rx wires (with 1k resistor connected TxD to Rxd) Jumper R3 at the lower left corner of the bottom side of the PCB), as shown in Fig 4.1 above, or the photo below.
 
6:58 AM
You might like to read this TB6600 Q&A about PID: electronics.stackexchange.com/questions/608751/…
 
 
2 hours later…
8:30 AM
So I have soldered a 1k resistor across the R3 jumper at the bottom of the tmc2225 board. It took me about an hour to solder two AWG30 wire wrapping wire to the jumper and soldered the 1k resistor.
Next step is the use the Rpi Pico MicroPython UART port to talk to the tmc2225board.
 
 
2 hours later…
10:28 AM
But I need to first use Pico to move mother, then perhaps then use pico uart to change m1, m1, microstepping resolution, to see if motor speed changes. I also forgot to mention that I don't need to use any Pico PWM pin to replace xy-lpwm sig gen, I can just toggle/blink a GPIO pin as step pulse, to move the motor. The following code is an example. One thing I am not sure is that if I can use very low step rate, such as 10pps, as the OP's demo code.
Rpi Pico MicroPythpn Controlling TMC2208 / TMC2209 / TMC2225 Stepper Motor Driver Problem - Asked 2021dec27, Viewed 553 times
raspberrypi.stackexchange.com/questions/135191/…

from machine import Pin
import utime

direction = Pin(14, Pin.OUT)
step = Pin(15, Pin.OUT)
enable = Pin(13, Pin.OUT)

enable.low()
direction.high()

def stepOne():
  step.high()
  utime.sleep(0.001)
  step.low()

while True:
    stepOne()
    utime.sleep(0.1)
 
 
13 hours later…
11:50 PM
@tlfong01 i found the spacers
 

« first day (8 days earlier)      last day (22 days later) »