I want to connect 2 ADXL’s to my S1 Pro setup for full-auto input shaping calibration (XY).
One accelerometer on the Pi, another on the printer’s uP, as suggested in the documentation.
Problem being that the isn’t a schematic for the S1 Pro,
After quickly looking at F401 datasheet and klipper’s printer FW code, it seems like the SPI interfaces are accounted for.
How can I reference a chosen SPI bus from the printer’s uP from the Pi’s “printer.cfg”?
Just another quick question, initially I was thinking of connecting the Pi to the printer controller via Serial. Do you see any advantage/disadvantage between using Serial/USB in terms of performance/reliability?
If I am to connect the Pico via USB might as well just do both that way.
I do not think that there is a universally valid answer:
USB is known to work reliably for countless installs
There are topics, where USB seems less reliable but very seldom. May be a combination of hardware and software, i.e. certain low cost USB to serial chips with driver issues in certain distributions
Sometimes the 5V line present in a USB connection may lead to problems. Most attributed to bad design choices of the printer board manufacturer
Long, low quality direct serial connections, i.e. bad crimps on cheap unshielded cables, might lead to issues as well
My personal opinion: USB is more comfortable, so I use it and never had issues with it. If you get weird issues, like MCU connection losses, high serial error counts etc, try a direct USART connection.
Hi again @Sineos you’re an hw/sw guy right? I need you once again.
OK so I got my S1 Pro like 3 days ago, went on with a few prints just for kicks before installing klipper (also to get used to the whole dial-in-to-perfection procedure). I was feeling kind of lazy.
Next day, still in the vibe of seeing what the printer could do before klipper, I decided to update the firmware today. S* went downhill from there on.
During update procedure: powered it on w/card in FW on STM32F4_UPDATE, dots on screen, waited (as I was expecting the screen to be blank during update from stuff I saw online). Did the LCD update procedure as well.
My board is a STM32F401. I have a STLink (I do HW/SW/uPs).
I assume the STM update failed. The LCD update seemed to go OK.
I proceeded to upload the F401 FW bin file via STLink w/start adress 0x08000000. Same result.
Out of desperation repeated it w/start address 0x0 in case it included the full image for the uP, including the bootloader.
I have now done a full chip erase, and I am hoping that someone can get me the bootloader image for S1 Pro.
Tried the following STM/LCD FW combos (from creality.com):
Ender-3 S1 Pro-Marlin184.108.40.206-SW-V220.127.116.11-MP-20211214,
went as far as the Ender-3 S1 Pro日语固件2022030310…
I guess I will try load the default STM32F401 bootloader next.
But I would like to be able to update from SD card and I’m assuming that that won’t work if I don’t have the the Creality bootloader.
OK, so things are looking slightly better on this end.
I flashed creality’s Ender-3s1pro_HWV2451_SW18.104.22.168F4_F401_LASER_FDM.bin w/stlink&stm32cubeprog @start address 0x08010000 [read in Fisheiyy’s S1 Pro config file that the bootloader is 64K] (w/run after prog checked) and the printer came back to life. However as expected it does not survive a reboot as it doesn’t have a bootloader to jump to 0x08010000. @Arksine could you give me a hand here?
If theres anything I can help you with, let me know - the printer is still open, guts out and everything. Talking of which, anybody knows if the boot0/boot1 pins are exposed on the board?
I think your best bet is to find a Creality support forum (perhaps a reddit, discord, or facebook group) and see if someone with this mainboard is willing to dump the first 64K of flash for you. That would get you the bootloader. Sans that, you could try create a custom build of CanBoot that will jump to an app at 0x8010000.
Clone the repo, then modify the Kconfig file in the src/stm32 directory to add the 64K App Start:
diff --git a/src/stm32/Kconfig b/src/stm32/Kconfig
index 30642ab..3c68905 100644
@@ -351,10 +351,13 @@ choice
bool "8KiB offset" if MACH_STM32F0 || MACH_STM32F1 || MACH_STM32G0
bool "4KiB offset" if MACH_STM32F0 || MACH_STM32F1 || MACH_STM32G0
+ config STM32_APP_START_10000
+ bool "64KiB offset" if MACH_STM32F4
+ default 0x8010000 if STM32_APP_START_10000
default 0x8008000 if STM32_APP_START_8000
default 0x8004000 if STM32_APP_START_4000
default 0x8002000 if STM32_APP_START_2000
Then run make menuconfig to configure the build. It will likely be similar to the below, however I’m not sure of the crystal used on this board:
Finally run make and use the programmer to upload out/canboot.bin to 0x08000000. CanBoot uses the same build dependencies as Klipper, so you should be able to build it on the same system that you built Klipper without an issue.
Flashing Creality’s official update .bin file the STLink way has to be done @start address 0x08010000. Period.
Creality’s .bin file DOES NOT contain the bootloader. If it did, you could could flash it @address 0x08000000 [but it doesn’t, so]. Forget flashing at 0x0. I’m an idiot and I was mad as hell. If you go that way you’ll end up like me. No matter how angry you are, DO NOT DO a FULL CHIP ERASE.
Most likely if the screen/system seems crashed its because you haven’t updated the screen’s firmware. Check this: Service tutorial Ender- 3 S1 Pro flash the mainboard and screen firmware - YouTube
Turns out that if you flash the bootloader at 0x08000000 and the firmware at 0x08010000, the printer still won’t boot.
So I just ran a full chip erase and flashed the bootloader only. Then went on with the normal update procedure with the FW bin file in sdcard, in STM32F4_UPDATE folder. This time it worked.
After dumping the full flash in both cases I realized that Creality’s bootloader does not flash an exact copy of the FW bin file. It adds a bit of data to it.
In any case, I am uploading a full flash image can you can burn with an stlink or similar at start adress 0x08000000. Also including the two flash dumps for anyone interested.
One year later just came here to mention something that I find important. I contacted Creality and told them about my issue. They sent me a new board free of charge. That’s how I managed to put everything together and fix my “broken” board. Now I have two mobos. These guys are awesome and a company that I will stand by.