Zonestar 802M upgrade to 0.92.8 mess up bootloader

edited February 2016 in Motherboard
Got a Zonestar 802M (melzi v 2.0) runing 0.92.5

Made a new firmware http://www.repetier.com/firmware/v092/ but after uploading it(full firmware) to the printer it freez and can't connet to it over USB anymore..Trying to upload 0.92.5 again fail..
Have to reflash bootloader and then  upload the 0.92.5 to work again..

Whats wrong..
After flash to 0.92.8 the display say 0.92.8 and is frozen..

Comments

  • latest 0.92.8 from this week is the first version to support that display.

    Fuses should protect bootloader from any damage and the firmware never writes to flash anyway, so it can not destroy a bootloader. But sometimes some circumstances prevent flashing from succeeding.

    Have you checked the log at what point it feezes. I have no melzo or zonestar for testing, so I have to relay on the authors experience, but everything looks ok and no reason to fail visible in code. Maybe you have set the wrong analog channel for the keys which is th eonly thing you have to set explicitly. Accoridng to author 1 would be the correct adc key pin.
  • edited February 2016
    I set the pin to analog 1..?
    How can i do the logging? not an expert on tihs..
  • Hit toggle log in repetier-host if it is not visible at the bottom anyway. For repetier-server switch to console tab.

  • edited February 2016
    Uploaded 0.92.8

    11:33:59.413 : Communication timeout - reset send buffer block
    11:33:59.413 : N11 M105*23
    11:34:02.284 : N12 M105*20
    11:34:05.349 : N13 M105*21
    11:34:08.408 : N14 M105*18
    11:34:11.478 : N15 M105*19
    11:34:14.546 : N16 M105*16
    11:34:17.613 : N17 M105*17
    11:34:20.678 : N18 M105*30
    11:34:23.727 : N19 M105*31
    11:34:53.330 : ok
    11:34:53.346 : N20 M105*21
    11:35:00.610 : ok
    11:35:00.610 : N21 M111 S7*85
    11:35:10.407 : ok
    11:35:10.407 : N22 M111 S5*84
    11:35:50.417 : Communication timeout - reset send buffer block
    11:35:50.417 : N23 M111 S7*87
    11:35:50.417 : N24 M105*17
    11:35:50.417 : N25 M111 S6*80
    11:35:50.417 : N26 M111 S7*82
    11:35:50.417 : N27 G28 X0*110
    11:35:52.639 : N28 M105*29

    Nothing moves..


  • edited February 2016
    Now reuploading 0.92.5 i get this

    Binary sketch size: 119 602 bytes (of a 131 072 byte maximum)
    avrdude: stk500_getsync(): not in sync: resp=0x00

    Flash bootloader and upload  0.92.5 again work..

  • If youg ot the time you can have a look over teamviewer..
  • Strange thing. Could not see the first 10 commands send. I'm also wondering why we get some lonely "ok" without line numbers, as repetier used to send normally. Did you change communication setting to non default values for some reason? This only makes communication more error prone and not fixable as fast as with them.
  • edited March 2016
    Just innstaled repetier-host ,did not change anything.. The OK is me pressingen OK button in repetier-host.
  • So we see no communication at all I guess. Has you 0.92.8 a different baud rate configured? SInce 0.92.5 works I guess it normally works.

    What is if you set display to none. Did it show anything? If it is a I2C display it can block for ever if it has a problem.
  • Repetier-host is connected (green) using same baud rate.. Can try no display later today..
  • Did you get this issue sorted?
  • Did not get the time to test.. try this weekend..
  • I remember I had some issues with flashing the firmware using the supplied bootloader in such printer. That's why I recommended to update bootloader first using ISP programmer (I used USBasp) from Arduino environment. After that I have never had any issue.

    Also please check this pull request: https://github.com/repetier/Repetier-Firmware/pull/493
    In short, if you used current sample Configuration.h and do NOT have an SD card inserted, you will have exactly that: printer constantly reboots showing only first boot screen. Disable watchdog and rebuild the firmware. I hope that pull request will be accepted ASAP, so the issue will be fixed.
  • Thanks osnwt
    Put in a SD card and the printer boots 0.92.8 just fine now..

  • But Connection to printer over USB is stil broken..Where do i find the new boot loader?

    avrdude: stk500_getsync(): not in sync: resp=0x00
  • edited March 2016
    I got the same problem when upgraded for the first time. You do not have to flash new bootloader to fix it. I solved it in the following way.
    1. Compile 0.92.8 firmware with support 5-button keypad. If you now try to load it from Arduino GUI the printer will hang up at boot screen.  You should follow next steps.
    2. Find *.hex file in the Arduino GUI output directory (build1363469897678184290.tmp/*.hex) which is located in the windows TEMP folder
    3. Download avrdude, start avrdude-gui, set command line to "-b57600 -e", select ATmega 1284P chip (see sample here), unplug printer from wall outlet, wait 5+ sec, connect it back and a moment after press "Erase-write" button in avrdude-gui. It should flash correctly now. Remember to set EEPROM-MODE if you want to override old eeprom settings.

    From now on the upgrade via Arduino GUI will be painless. So you are free to modify whatever you want.

    Here is Zonestar tool to recover the 0.91 firmware
     
  • The issue is due to a bug in old bootloader. It is actually an Arduino boot issue for many boards. The bootloader does not disable watchdog timer if it was enabled by a firmware. This means that on some boards/MCUs even hardware reset does not stop the watchdog. If the firmware enabled it once, you cannot reflash the board using arduino bootloader since the board will always restart. That is exactly that I meant saying about "some issues" here: https://github.com/repetier/Repetier-Firmware/tree/master/boards/Zonestar P802M

    Workaround: as mentioned above, do power off/on and try to erase the firmware that enables watchdog until it is activated.
    Real solution: use better bootloader that handles watchdog as it should.

  • Just updated master/online tool with a new command

    M281 X0

    will disable watchdog on avr boards. So if you do this before uploading new firmware you should be able to upload even when watchdog was initially activated with the broken bootloader that do not handle watchdog correctly.
  • The issue is due to a bug in old bootloader. It is actually an Arduino boot issue for many boards. The bootloader does not disable watchdog timer if it was enabled by a firmware. This means that on some boards/MCUs even hardware reset does not stop the watchdog. If the firmware enabled it once, you cannot reflash the board using arduino bootloader since the board will always restart. That is exactly that I meant saying about "some issues" here: https://github.com/repetier/Repetier-Firmware/tree/master/boards/Zonestar P802M

    Workaround: as mentioned above, do power off/on and try to erase the firmware that enables watchdog until it is activated.
    Real solution: use better bootloader that handles watchdog as it should.

    Hi , how burn the better bootloader? Thanks.

  • Sorry for reviving an old thread.

    Would just like to add to Phisik's comment that the board should be supplied from the USB port and not from the on board regulator. Else the verification/flashing will fail.

    Else than that, super good work and thanks for this!
Sign In or Register to comment.