bigtreetech / BIGTREETECH-TouchScreenFirmware

support TFT35 V1.0/V1.1/V1.2/V2.0/V3.0, TFT28, TFT24 V1.1, TFT43, TFT50, TFT70
GNU General Public License v3.0
1.32k stars 1.65k forks source link

Unable to update the firmware #24

Closed EnnajimiYassine closed 3 years ago

EnnajimiYassine commented 5 years ago

I'm unable to update the firmware of my board tft35 ( hardware : V1.2, firmware : 1.2.6)

when i put the firmware on the SD card and reset nothing happen ( no firmware update), but when i put the bmp and font they get updated ( but still not the firmware)

Can please some one help ?

EsQueue81 commented 4 years ago

Oddly enough, I can't get St-Link to work on my Windows 10 PC at all due to MCU is held in reset" errors. It does work on my ancient W7 PC.

Thanks for the response guys. I since sourced a very stable power supply. As for mass erasing, I forgot to include that it did erase the chip as everything is Zero'd out and the flash size is "Unknown" but it gave the readout protection during erase and is still giving the error. Some research on google showed how to disable in in st-Link but when I try to disable it, it gives me the error "Could not set Option bytes! Please reset the target and retry."

Unfortunately, I've tried at least 30 times. I will not give up 😢

I've used up too much time diagnosing. Everyone's recommendations whether it be sending 3v3 to the Boot0 and using ttl to every possible setting in st link, I have a hardware issue somewhere. I can't flash any bin or hex files, erasing actually erased the data but kept the write protection, 5.1v constant power, and nothing. The RS232 port is completely disabled so no more TTL. The SWD can read but that's all it can do.

For reference, the only way I can connect to the board in st link is to have SWD, Hot Plug modes. No other modes work. Reset button also does nothing anymore.

My replacement will arrive on Saturday due to the holiday season. I will get a v3.0 instead of the 2.0 as I don't even want to see the thing anymore. Feel so damn defeated and don't even feel like completing this 3d printer anymore. Thanks guys.

carl1961 commented 4 years ago

Oddly enough, I can't get St-Link to work on my Windows 10 PC at all due to MCU is held in reset" errors. It does work on my ancient W7 PC. Thanks for the response guys. I since sourced a very stable power supply. As for mass erasing, I forgot to include that it did erase the chip as everything is Zero'd out and the flash size is "Unknown" but it gave the readout protection during erase and is still giving the error. Some research on google showed how to disable in in st-Link but when I try to disable it, it gives me the error "Could not set Option bytes! Please reset the target and retry." Unfortunately, I've tried at least 30 times. I will not give up 😢

I've used up too much time diagnosing. Everyone's recommendations whether it be sending 3v3 to the Boot0 and using ttl to every possible setting in st link, I have a hardware issue somewhere. I can't flash any bin or hex files, erasing actually erased the data but kept the write protection, 5.1v constant power, and nothing. The RS232 port is completely disabled so no more TTL. The SWD can read but that's all it can do.

For reference, the only way I can connect to the board in st link is to have SWD, Hot Plug modes. No other modes work. Reset button also does nothing anymore.

My replacement will arrive on Saturday due to the holiday season. I will get a v3.0 instead of the 2.0 as I don't even want to see the thing anymore. Feel so damn defeated and don't even feel like completing this 3d printer anymore. Thanks guys.

Look up @xC0000005 If anyone can bring life back to a board he can! https://github.com/xC0000005

xC0000005 commented 4 years ago

I'd start by unlocking the board (you can find a guide to that here https://nathan.vertile.com/blog/2017/03/05/unlocking-stm32-chips/

if you are running OSX I can share the commands I use to connect using GDB):

Start Debug Server:

~/Library/Arduino15/packages/STM32/tools/STM32Tools/2017.9.22/tools/macosx/stlink/st-util

Launch GDB:

~/Library/Arduino15/packages/STM32/tools/arm-none-eabi-gcc/8.2.1-1.7/bin/arm-none-eabi-gdb

Connect:

target remote localhost:4242

THEN run the unlock/reset/halt, and after that, you should be able to program it all.

On Wed, Dec 25, 2019 at 8:26 PM carl1961 notifications@github.com wrote:

Oddly enough, I can't get St-Link to work on my Windows 10 PC at all due to MCU is held in reset" errors. It does work on my ancient W7 PC. Thanks for the response guys. I since sourced a very stable power supply. As for mass erasing, I forgot to include that it did erase the chip as everything is Zero'd out and the flash size is "Unknown" but it gave the readout protection during erase and is still giving the error. Some research on google showed how to disable in in st-Link but when I try to disable it, it gives me the error "Could not set Option bytes! Please reset the target and retry." Unfortunately, I've tried at least 30 times. I will not give up 😢

I've used up too much time diagnosing. Everyone's recommendations whether it be sending 3v3 to the Boot0 and using ttl to every possible setting in st link, I have a hardware issue somewhere. I can't flash any bin or hex files, erasing actually erased the data but kept the write protection, 5.1v constant power, and nothing. The RS232 port is completely disabled so no more TTL. The SWD can read but that's all it can do.

For reference, the only way I can connect to the board in st link is to have SWD, Hot Plug modes. No other modes work. Reset button also does nothing anymore.

My replacement will arrive on Saturday due to the holiday season. I will get a v3.0 instead of the 2.0 as I don't even want to see the thing anymore. Feel so damn defeated and don't even feel like completing this 3d printer anymore. Thanks guys.

Look up @xC0000005 https://github.com/xC0000005 If anyone can bring life back to a board he can! https://github.com/xC0000005

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bigtreetech/BIGTREETECH-TouchScreenFirmware/issues/24?email_source=notifications&email_token=AHVGS4KKSZ43NE74KIR53ZDQ2QW6JA5CNFSM4IMHXLC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHU3VEQ#issuecomment-568965778, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHVGS4MINORZPXVI4YVSBG3Q2QW6JANCNFSM4IMHXLCQ .

EsQueue81 commented 4 years ago

I'd start by unlocking the board (you can find a guide to that here https://nathan.vertile.com/blog/2017/03/05/unlocking-stm32-chips/ if you are running OSX I can share the commands I use to connect using GDB): Start Debug Server: ~/Library/Arduino15/packages/STM32/tools/STM32Tools/2017.9.22/tools/macosx/stlink/st-util Launch GDB: ~/Library/Arduino15/packages/STM32/tools/arm-none-eabi-gcc/8.2.1-1.7/bin/arm-none-eabi-gdb Connect: target remote localhost:4242 THEN run the unlock/reset/halt, and after that, you should be able to program it all. … On Wed, Dec 25, 2019 at 8:26 PM carl1961 @.***> wrote: Oddly enough, I can't get St-Link to work on my Windows 10 PC at all due to MCU is held in reset" errors. It does work on my ancient W7 PC. Thanks for the response guys. I since sourced a very stable power supply. As for mass erasing, I forgot to include that it did erase the chip as everything is Zero'd out and the flash size is "Unknown" but it gave the readout protection during erase and is still giving the error. Some research on google showed how to disable in in st-Link but when I try to disable it, it gives me the error "Could not set Option bytes! Please reset the target and retry." Unfortunately, I've tried at least 30 times. I will not give up 😢 I've used up too much time diagnosing. Everyone's recommendations whether it be sending 3v3 to the Boot0 and using ttl to every possible setting in st link, I have a hardware issue somewhere. I can't flash any bin or hex files, erasing actually erased the data but kept the write protection, 5.1v constant power, and nothing. The RS232 port is completely disabled so no more TTL. The SWD can read but that's all it can do. For reference, the only way I can connect to the board in st link is to have SWD, Hot Plug modes. No other modes work. Reset button also does nothing anymore. My replacement will arrive on Saturday due to the holiday season. I will get a v3.0 instead of the 2.0 as I don't even want to see the thing anymore. Feel so damn defeated and don't even feel like completing this 3d printer anymore. Thanks guys. Look up @xC0000005 https://github.com/xC0000005 If anyone can bring life back to a board he can! https://github.com/xC0000005 — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#24?email_source=notifications&email_token=AHVGS4KKSZ43NE74KIR53ZDQ2QW6JA5CNFSM4IMHXLC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHU3VEQ#issuecomment-568965778>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHVGS4MINORZPXVI4YVSBG3Q2QW6JANCNFSM4IMHXLCQ .

I made some progress. I learned to use OpenOCD which took a while as I had to also learn to use PuTTY. I also got it to connect to my main pc. When I try to unlock, I get the error that my flash size failed to probe and it puts an incorrect size of 512k. I'll have to learn the Flash Bank command but I have no idea what FLASHNAME they are talking about. The other main error is "Target not halted" this prevents almost all commands from working. Adding halt in the config and manually executing it just causes a timeout.

I'm slowly chipping away at it. My goal is to get it working by tomorrow when my replacement arrives. If I can fix it, I'll use it on my old trusty 3d printer. Thanks for the information.

Pixel-Soup commented 4 years ago

The "target not halted" problem is most likely due to the .1uF capacitor on the reset pin of the MCU. It adds too much delay to the reset process, causing openOcd to time out. The simplest solution is to temporarily remove it, so that you can use the ST-link to re-flash the boot-loader. Alternatively, you can try to configure openOcd to wait longer for the MCU to respond after a reset is issued.

xC0000005 commented 4 years ago

I'm actually more concerned that the ST link can't probe correctly. If you use the ST-info utility, can it ID the chip and info with --probe?

That said, SWD can (and does) get hosed by clock config, which is why being able to hold reset is important (acquire under reset usually works). If BOOT0 is held at 3.3v TTL, it should be booting from system memory, not flash, and that clock config will usually work.

On Fri, Dec 27, 2019 at 9:29 AM Pixel-Soup notifications@github.com wrote:

The "target not halted" problem is most likely due to the .1uF capacitor on the reset pin of the MCU. It adds too much delay to the reset process, causing openOcd to time out. The simplest solution is to temporarily remove it, so that you can use the ST-link to re-flash the boot-loader. Alternatively, you can try to configure openOcd to wait longer for the MCU to respond after a reset is issued.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bigtreetech/BIGTREETECH-TouchScreenFirmware/issues/24?email_source=notifications&email_token=AHVGS4KYHLJRUPHXI5EEQI3Q2Y3N5A5CNFSM4IMHXLC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHXQGDI#issuecomment-569312013, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHVGS4IYNN5BJMTSEYIS62LQ2Y3N5ANCNFSM4IMHXLCQ .

Pixel-Soup commented 4 years ago

Probe and most other SWD functions will not work if the reset pin is interfered with by the capacitor. I've encountered this many times on other boards. Removing the cap is an easy fix for anyone with some soldering skills.

JustGand commented 4 years ago

I was experiencing the same problem (unable to update from V1.2.6 on V1.2 hardware), and renaming the BIQU_TFT35_V1.2.25.2.bin firmware to BIQU_TFT35.bin worked !

SimonSolar2C commented 4 years ago

I had a lot of trouble trying to get the bootloader to load onto the board. The error message in FlyMCU read something like ""program space must be in either (...etc" Turned out I was trying to load the bin file - make sure to use the bootloader hex file ! PS FlyMCU could only find COM1 on y win10 64bit PC. I used my laptop in the end which is Win7 64bit

fenix8k commented 4 years ago

To be able to update the firmware you need a really specific SD format settings, It need to be less than 8GB, have a Primary MBR Partition marked as Active in Fat format

Elrikus commented 4 years ago

@bigtreetech Can I ask for bootloader to TFT24 ? My is dead after firmware upgrade. I have CH341a to write.

Software-Nub commented 4 years ago

Can I also have the TFT24 boot loader please, Thanks

sangeriz commented 4 years ago

i have the same problem with TFT 3.5 V3, Illegal flash app, its my second board with the same problem I used the right file but its impossible make it work

draon7 commented 4 years ago

Hi, it seems like I have similar problem, I flashed my TFT24 with v1.1.26.x.bin and everything went well but after that, I wanted to make some more changes, but I cannot flash any new firmware. Bootloader goes through the update process, but nothing changes. I tried different firmware versions including precompiled ones and nothing changes. I tried renaming .bin file. I tried @poisson21 advice to disconnect EXP2 but it didn't help. I guess there is a bug in new firmware that prevents flashing updates. Since I have ST-LINK v3 I guess I can clear it and reflash the bootloader, does someone have bootloader for TFT24?

Pixel-Soup commented 4 years ago

@draon7 Is the tft24 still able to see the sd card files when you press the "print" icon? Does the bootloader change the name of the .BIN file to .CUR on the sd card?

sangeriz commented 4 years ago

At least for me, if I turn the printer with a sd card inside, with Gcode files, say illegal flash, and if you forgot the sd card inside, you must reflash again with config.ini, tft35 "bmp files" and bin file. A big problem, I hope the next update BTT solve the problem.

oldman4U commented 4 years ago

Please help the community and close the ticket now that it is one year old Thank you

DragonTSD commented 3 years ago

Is it expected the bootloaders rename the .bin files to .cur when flashed?

From what I've read, yes, as long as the .bin file is utilized correctly by the printer once, it changes the extension to .CUR.

dronn1974 commented 3 years ago

Who dealt with this problem, can you describe in detail the entire process of resuscitation of Bigtreetech TFT35 V2. 0

oldman4U commented 3 years ago

https://github.com/bigtreetech/BIGTREETECH-TouchScreenFirmware#update-tft-firmware

oldman4U commented 3 years ago

And https://github.com/bigtreetech/BIGTREETECH-TouchScreenFirmware/tree/master/Bootloaders/TFT35_V2%20Bootloader%20fix

oldman4U commented 3 years ago

This ticket is very old and the owner does not respond anymore. It is unlikely that someone will answer this further, now that I stop watching it. Please start a new ticket in case you have a problem with updating the firmware of your TFT and make sure to read this before doing so: https://github.com/bigtreetech/BIGTREETECH-TouchScreenFirmware#connect-the-tft-to-the-mainboard

Thank you

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Michel12122 commented 1 year ago

On my tft 24 v1.1 I found that on a exp1 exp2 config, no serial(for my case,didn't test with). to be able to flawlessly flash new firmware you have to disconnect exp2 to make it work. I think the feedback of the "sd card presence" pin interfere with the upload.

Very thanks a few days ago I was complaining with my tft and disconnecting the exp 2 I was able to update it

hello-my commented 1 year ago

I have a problem with my TFT35 V3.0.1, the firmware wont update and none of the file names for the .bin file is working. I can get the fonts and language to change too, but its only the firmware file

github-actions[bot] commented 7 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.