Klipper configuration on the Fly SHT-42 V1 for CAN bus
Edit me

Setup steps

Toolboard firmware

Compile Klipper firmware for can

  • ssh to your klipper host console
  • cd to the klipper directory
    cd klipper
    
  • Run make clean
    make clean
    
  • Open menuconfig
    make menuconfig
    
  • Set the following settings
    • Enable extra Low Level configuration options : Checked
    • Micro Controller : STMicroelectronics STM32
    • Processor Model: stm32f072
    • Build: 8 Kib bootloader
    • Clock Ref: 8 MHz crystal
    • Comm Interface - CAN bus on PA8/PA9
    • Application Offset 8 Kib

    • CanBus Speed: 500000

      Klipper Menu Config CAN
      Klipper Menu Config CAN
  • Quit and save the configuration

  • Run Make to compile the firmware
make -j 4

Flash Klipper firmware with CanBoot over CAN bus

  • Get the SHT-42 UUID buy running the following script.
     ~/CanBoot/scripts/flash_can.py -i can0 -q
    
  • If CAN devices are detected the above command will return the following.
    Found canbus_uuid=6248a4b16ede
    
  • Each device will have a unique uuid. In the above example, 6248a4b16ede is the micro-controller’s canbus uuid.

  • Save the UUID for the next step.

  • Flash the klipper FW to the SHT-42 by running the following command.
    python3 ~/CanBoot/scripts/flash_can.py -i can0 -f ~/klipper/out/klipper.bin -u {paste your UUID here}
    

    Example

    python3 ~/CanBoot/scripts/flash_can.py -i can0 -f ~/klipper/out/klipper.bin -u 6248a4b16ede
    
  • You should get a download progress bar and File downloaded successfuly when the burning is complete.
    Klipper FW burn over can
    Klipper FW burn over can
  • Your SHT-42 should now have klipper firmware loaded and be ready to use.

CAN configuration

  • Run one the following commands at the Klipper host SSH console to get the UUID for the SHT-42 tool board.
~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0

or

~/CanBoot/scripts/flash_can.py -i can0 -q
  • If uninitialized CAN devices are detected the above command will report lines like the following:
    Found canbus_uuid=6248a4b16ede
    
  • Each device will have a unique identifier. In the above example, 6248a4b16ede is the micro-controller’s “canbus_uuid”.

add screen shot here

  • Add the following lines to your printer.cfg file replacing the UUID with the one you copied in the last section.
[mcu SHT-42]      
canbus_uuid: { your UUID here } 
# run the following command to locate the uuid >   ~/CanBoot/scripts/flash_can.py -i can0 -q
Tags: