makerbase-mks / MKS-SKIPR

MKS SKIPR is an all-in-one board launched by Makerbase for running Klipper. It integrates the RK3328 SOC running the Klipper host and the STM32F407VET6 MCU responsible for executing specific machine actions. It meets the use of most 3D printers.
GNU General Public License v3.0
91 stars 15 forks source link

MCU instructions #23

Closed darkjavi closed 1 year ago

darkjavi commented 1 year ago

I've just received an unit and cannot figure out how to use/flash the mcu.

Flashed latest image to the emmc, connected +12v to input and booted the board, fluid gets up but cannot get info from moonraker. I would bet that the mcu has already been flashed at factory but tried Kiauh build and flash (when asked i'm not sure if comm interface is serial, can or usb can), nevertheless when it builds the firmware it cannot be flashed to /dev/ttyS0, error 255.

Been looking around and while the docs cover the most inmediate operations, cannot find any information on mcu managment, some guidance would be very helpfull, not sure if I'm doing it completely wrong or my board has a defective mcu.

darkjavi commented 1 year ago

Did some testing:

[ 1104.240229] usb usb2-port1: Cannot enable. Maybe the USB cable is bad?
[ 1105.140082] usb usb2-port1: Cannot enable. Maybe the USB cable is bad?
[ 1105.140136] usb usb2-port1: attempt power cycle
[ 1106.116135] usb usb2-port1: Cannot enable. Maybe the USB cable is bad?
[ 1197.023052] usb usb2-port1: Cannot enable. Maybe the USB cable is bad?
[ 1197.923207] usb usb2-port1: Cannot enable. Maybe the USB cable is bad?
[ 1197.923338] usb usb2-port1: attempt power cycle

A shorter USB cable gave me a little bit more but still usb is not working:


[  501.929931] usb 3-1: new full-speed USB device number 2 using ohci-platform
[  517.530325] usb 3-1: device descriptor read/64, error -110
[  532.798896] usb usb2-port1: Cannot enable. Maybe the USB cable is bad?
[  533.170767] usb 3-1: device descriptor read/64, error -62
[  533.466786] usb 3-1: new full-speed USB device number 3 using ohci-platform
[  549.023228] usb 3-1: device descriptor read/64, error -110
[  561.535617] usb usb2-port1: Cannot enable. Maybe the USB cable is bad?
[  562.435620] usb usb2-port1: Cannot enable. Maybe the USB cable is bad?
[  562.435675] usb usb2-port1: attempt power cycle
[  563.383623] usb 3-1: new full-speed USB device number 4 using ohci-platform
[  578.971930] usb 3-1: device descriptor read/64, error -110
[  592.255950] usb usb2-port1: Cannot enable. Maybe the USB cable is bad?
[  593.339703] usb 3-1: new full-speed USB device number 5 using ohci-platform
[  608.923499] usb 3-1: device descriptor read/64, error -110
[  632.811195] usb 1-1: new full-speed USB device number 2 using dwc2
[  648.151006] usb 1-1: device descriptor read/64, error -104
[  653.588075] dwc2 ff580000.usb: Not connected
[  681.942536] usb 1-1: new full-speed USB device number 3 using dwc2
[  697.498337] usb 1-1: device descriptor read/64, error -110
[  949.791250] usb 3-1: new full-speed USB device number 6 using ohci-platform

Now I'm prone to think the mcu is deffective (or I'm missing something very basic)

darkjavi commented 1 year ago

Indeed I was missing something basic, my bad, on the printer.cfg header there is the basic information to flash the MCU:


To use this config, the firmware should be compiled for the
# stm32f407. When running "make menuconfig", select the 48KiB
# bootloader, and enable "Serial for communication" and select the "on USART1 PA10/PA9"

# The "make flash" command does not work on the MKS SKIPR. Instead,
# after running "make", copy the generated "out/klipper.bin" file to a
# file named "mks_skipr.bin" on an SD card and then restart the
# MKS SKIPR with that SD card.