CrealityOfficial / Ender-3S1

This Source code for Creality Ender-3S1 Series,MCU and Screen
GNU General Public License v3.0
129 stars 52 forks source link

ender 3 s1 F4 mainboard stuck #9

Open Nbrooks639 opened 2 years ago

Nbrooks639 commented 2 years ago

i am now on my second f4 mainboard that is stuck with the last firmware flashed to it. i have updated it, with correct firmware along the way, now i cant change anything it wont flash anymore

mriscoc commented 2 years ago

EDIT: For future reference, we identify some kind of flag zone in the EEPROM for the Ender3S1 F4 bootloader, if that zone is written with certain values the bootloader refuses to flash new firmware. That zone seems to be between the EEPROM index 916 and 926, so custom firmware must avoid that flag zone in the EEPROM when load and save parameters.

===============

That's strange, so the bootloader is being overwritten, it is very bad because the bootloader must take care about that, it is out of control of the firmware.

CrealityTech commented 2 years ago

i am now on my second f4 mainboard that is stuck with the last firmware flashed to it. i have updated it, with correct firmware along the way, now i cant change anything it wont flash anymore

can change the start address,modified to 0x80000,and use usb prot download with stm flash download or else give us mail address we send it

Nbrooks639 commented 2 years ago

ok can i send you my address through another link of some sort please?

Nbrooks639 commented 2 years ago

i am now on my second f4 mainboard that is stuck with the last firmware flashed to it. i have updated it, with correct firmware along the way, now i cant change anything it wont flash anymore

can change the start address,modified to 0x80000,and use usb prot download with stm flash download or else give us mail address we send it

brooks639@yahoo.com

CrealityTech commented 2 years ago

hi ,we have send file to you mail,

Nbrooks639 commented 2 years ago

i have not received anything @CrealityTech

Nbrooks639 commented 2 years ago

Still have not seen any support for this situation. Going on how long now? I am on stm32f4 mainboard number 3 because I can't get a response fast enough for aupport

ffnull commented 2 years ago

Still have not seen any support for this situation. Going on how long now? I am on stm32f4 mainboard number 3 because I can't get a response fast enough for aupport

"Great" support

Nbrooks639 commented 2 years ago

Still have not seen any support for this situation. Going on how long now? I am on stm32f4 mainboard number 3 because I can't get a response fast enough for aupport

"Great" support

yea its crazy. i gave up. what keeps happening to yours? samething? after so many flashes it just stops taking firmware?

CrealityTech commented 2 years ago

dified to 0x80000,an

sorry about that ,you have not received ? ok i send you email again,please check you email,3QU

Nbrooks639 commented 2 years ago

dified to 0x80000,an

sorry about that ,you have not received ? ok i send you email again,please check you email,3QU

your email makes absolutely no sense what so ever

CrealityTech commented 1 year ago

dified to 0x80000,an

sorry about that ,you have not received ? ok i send you email again,please check you email,3QU

your email makes absolutely no sense what so ever

common don't say that,we have sent the file that you want twice,haven't received yet? the email address maybe not crealithTech,please check you inbox with xxxx@creality.com

Nbrooks639 commented 1 year ago

the mainboard does not do anything. ive tried your info and it will not update at all

CrealityTech commented 1 year ago

the mainboard does not do anything. ive tried your info and it will not update at all

the update file must in the folder named"STM32F4_UPDATE",

Nbrooks639 commented 1 year ago

yes i know this i have already explained that i did a few firmware updates, i know exactly how it works.

CrealityTech commented 1 year ago

yes i know this i have already explained that i did a few firmware updates, i know exactly how it works.

and now how it's go?

Nbrooks639 commented 1 year ago

no it does nothing the board will not change at all its completely stuck like i have been explaining for the passed 6 months this is crazy look how long its been. please send me a new mainboard

CrealityTech commented 1 year ago

So sorry about that Please contact us after sales

FulminatingGhost commented 1 year ago

Hello, I am currently facing the same issue. I can not flash new firmware via the bootloader no matter what I try. When I monitor serial data on startup, I sometimes see a message like "Bootloader SD card ..." I will try to investigate and re-flash with a ST-Link next week.

FulminatingGhost commented 1 year ago

Well, I was able to flash the firmware and bootloader using an ST-Link. Updating the firmware through the bootloader worked once after that. It would not update on subsequent tries. I also took a flash dump before re-flashing and except for the last filename at offset 0x0800c000 nothing was different from before the re-flash. Does the bootloader check any other addresses in flash that might stop it from doing the update?

mriscoc commented 1 year ago

Well, I was able to flash the firmware and bootloader using an ST-Link. Updating the firmware through the bootloader worked once after that. It would not update on subsequent tries. I also took a flash dump before re-flashing and except for the last filename at offset 0x0800c000 nothing was different from before the re-flash. Does the bootloader check any other addresses in flash that might stop it from doing the update?

Maybe it could be a bug in the firmware filename checking? Other boards do not allow flashing firmware with the same name as the currently installed one. Is the filename null-terminated?

FulminatingGhost commented 1 year ago

Well, I was able to flash the firmware and bootloader using an ST-Link. Updating the firmware through the bootloader worked once after that. It would not update on subsequent tries. I also took a flash dump before re-flashing and except for the last filename at offset 0x0800c000 nothing was different from before the re-flash. Does the bootloader check any other addresses in flash that might stop it from doing the update?

Maybe it could be a bug in the firmware filename checking? Other boards do not allow flashing firmware with the same name as the currently installed one. Is the filename null-terminated?

I always verified the filename to be different from the one before. I also tried using very short or very long filenames to no success. In flash, there is no null-termination, but rather the remainder of the 256 byte area is filled with 0xFF bytes.

nadavhury commented 1 year ago

Well, I was able to flash the firmware and bootloader using an ST-Link. Updating the firmware through the bootloader worked once after that. It would not update on subsequent tries. I also took a flash dump before re-flashing and except for the last filename at offset 0x0800c000 nothing was different from before the re-flash. Does the bootloader check any other addresses in flash that might stop it from doing the update?

Hi, Can you please explain how you've managed to flash the new firmware with st-link? I'm trying to flash my ender3 s1 pro from the 2.0.8.15F4 version to the new version 2.0.8.24F4 with the laser with no success. I have tried any sd card I have, (right now the only 8GB card I have is the one supplied with the printer), in the STM32F4_UPDATE folder and outside of it, 4092 allocation units, default allocation size, absolutely tried anything I could find on Reddit, and here, not flashing any firmware, frustrating. Any help is much appreciated!

FulminatingGhost commented 1 year ago

Hi, Can you please explain how you've managed to flash the new firmware with st-link? I'm trying to flash my ender3 s1 pro from the 2.0.8.15F4 version to the new version 2.0.8.24F4 with the laser with no success. I have tried any sd card I have, (right now the only 8GB card I have is the one supplied with the printer), in the STM32F4_UPDATE folder and outside of it, 4092 allocation units, default allocation size, absolutely tried anything I could find on Reddit, and here, not flashing any firmware, frustrating. Any help is much appreciated!

Hi, I used the st-link command line utility to first flash the bootloader at 0x08000000 and afterwards the firmware at 0x08010000. The connector for the st-link adapter is J201 on the CR-FDM-v24S1_301 board. The pinout is, beginning at the side where the SD card and usb connector reside: VCC, DIO, CLK, GND. The VCC must be connected to the VAPP pin of the ST-Link. If the FW does not start, then the bootloader might want to do an update via sd card. In the end I resorted to not using the bootloader anymore since the SD update works very unreliable for me.

nadavhury commented 1 year ago

Hi, Can you please explain how you've managed to flash the new firmware with st-link? I'm trying to flash my ender3 s1 pro from the 2.0.8.15F4 version to the new version 2.0.8.24F4 with the laser with no success. I have tried any sd card I have, (right now the only 8GB card I have is the one supplied with the printer), in the STM32F4_UPDATE folder and outside of it, 4092 allocation units, default allocation size, absolutely tried anything I could find on Reddit, and here, not flashing any firmware, frustrating. Any help is much appreciated!

Hi, I used the st-link command line utility to first flash the bootloader at 0x08000000 and afterwards the firmware at 0x08010000. The connector for the st-link adapter is J201 on the CR-FDM-v24S1_301 board. The pinout is, beginning at the side where the SD card and usb connector reside: VCC, DIO, CLK, GND. The VCC must be connected to the VAPP pin of the ST-Link. If the FW does not start, then the bootloader might want to do an update via sd card. In the end I resorted to not using the bootloader anymore since the SD update works very unreliable for me.

Thank you! The instructions you have written are some really pro stuff, I have some homework to do :) Thank you again.

sidcha commented 1 year ago

I used the st-link command line utility to first flash the bootloader at 0x08000000 and afterwards the firmware at 0x08010000. The connector for the st-link adapter is J201 on the CR-FDM-v24S1_301 board. The pinout is, beginning at the side where the SD card and usb connector reside: VCC, DIO, CLK, GND. The VCC must be connected to the VAPP pin of the ST-Link.

@FulminatingGhost thanks for the tip. I'm also experiencing very unreliable bootloader behaviour and decided nuke it. I don't have a genuine st-link but the inexpensive clone (dongle). This dongle only has 3v3 and 5v pins not a VAPP (you mentioned that the VCC must be connected to the VAPP pin on stlink). Looking up the docs for the original st-link, looks like VAPP is used only as a reference.

I suspect connecting it to the 3v3 pin in the dongle is a bad idea (it is a source). Not connecting the VCC pin to the dongle and proceeding results in: Soft reset failed: timeout. Do you have any suggestions for me?

sidcha commented 1 year ago

Okay, I managed to figure out the issue. I have an ender 3 S1 Pro so everything below applies to that board exclusively. Here are my findings:

This is a markup I created for my reference: pinout

CubeCmder commented 8 months ago

Okay, I managed to figure out the issue. I have an ender 3 S1 Pro so everything below applies to that board exclusively. Here are my findings:

  • VCC not being connected is not an issue.
  • There are 2 unsoldered pins right next to the annoyingly bright blue LED. One of them is RST and the other is GND. You can short these to reset the device (see below).
  • st-flash fails due to two reasons:

    • stm32f401 has 256k flash and that is not what it is expecting. You can pass --flash 256k to st-flash to overcome this issue.
    • It also wanted the device to be held in reset. This can be done by shorting the unsoldered 2 pins mentioned above.
  • openocd does not have any of the above issues that st-flash has :) So you can just do:

    openocd -f interface/stlink.cfg -f target/stm32f4x.cfg -c "program klipper.bin verify exit 0x08000000"

    Note: this removed the bootloader (I don't care about it).

  • The 10 pin box connector has a UART line, pins: 3: TX 4: RX 9: GND.
  • Right next to the exposed USB-C connector there is are unsoldered 4 pins where you can solder a USB-A connector and get the onboard USB-Serial connection (handy if you don't want to use the USB-C connector).

This is a markup I created for my reference: pinout

I am having a similar issue where i cant flash any new firmware to the board. Were you able to flash a new firmware this way? So basically you bridge the RST pin with ground to put it in reset and connect the SWD pins to the dongle? Did you externally power the board while performing the update?

sidcha commented 8 months ago

Were you able to flash a new firmware this way?

Yes.

So basically you bridge the RST pin with ground to put it in reset and connect the SWD pins to the dongle?

Yes.

Did you externally power the board while performing the update?

No, you don't have to.

mriscoc commented 8 months ago

For future reference, we identify some kind of flag zone in the EEPROM for the Ender3S1 F4 bootloader, if that zone is written with certain values the bootloader refuses to flash new firmware. That zone seems to be between the EEPROM index 916 and 926, so custom firmware must avoid that flag zone in the EEPROM when load and save parameters.

There is a possible fix in this comment: https://github.com/mriscoc/Ender3V2S1/issues/1180#issuecomment-1911528544

CubeCmder commented 8 months ago

I haven't been able to store any settings to eeprom, could this explain that? Also am supposed to run the gcode and then perform the normal flashing sequence?

mriscoc commented 8 months ago

I haven't been able to store any settings to eeprom, could this explain that? Also am supposed to run the gcode and then perform the normal flashing sequence?

It depends on which firmware your printer currently has but you can try it. Put the firmware in the STM32F4_UPDATE SD card folder, run the G-code file and reboot the printer.

CubeCmder commented 8 months ago

I just applied this fix and it worked! Thanks again Miguel!

dkostwg commented 4 months ago

Hey, I know this is an old thread but hopefully someone is still is available for a question. I have an ender 3 S1 with an F401 RCT6 chip. I can use STlink V2 USB dongle to program the STM32f401RCTx_BootLoader_v1.bin bootloader @ 0x08000000 and then program the Klippy.bin generated with make flash @ 0x08010000. The programming says it completes fine using STM32cube programming SW. However when connecting to my pi 3B (running latest klipper/mainsail/etc., the printer just not recognized by Klipper and it sits at trying to connect. lsusb does not show anything besides a generic USB interface so at least it sees that tied to the board when plugging in USB but it does not know its the printer and it does not appear as a DFU device from what I can tell. So I am guessing perhaps there are other parameters to write to the FLASH(?) to let the bootloader know some additional information. The STM32F401 FLASH was fully erased at some point while I was experimenting with trying to get it working. Any ideas? Thank you!