Unable to flash firmware anymore

Troubleshooting talk for software

Unable to flash firmware anymore

Postby nguillaumin » 2013-Mar-Tue-04-Mar

Hi,

I assembled my first Printrbot Jr. this week-end from a kit, but I'm having trouble with the firmware.
After assembly all the axes were inverted. To fix that I tried to build a firmware with the configuration.h changed to invert the axes using the Arduino 022 and Merlin packages available on the Printrbot Jr. website.
I must have messed something up when flashing the firmware though, because now the printrboard is not recognized anymore when I connect it to my computer.

If I switch the board to BOOT mode (setting the jumper, it's a rev. D) it's then correctly detected by the OS in DFU mode (both tested on Linux and Windows).
However I can't get it to upload a new firmware in DFU mode. I tried with dfu-programmer on Linux and Windows, and with Flip on Windows but to no avail.

  • On Windows Flip says "Blank check failed 0x000000". When I untick "Blank check" I then got "Verify fail 0x000000".
  • On Linux (as root) dfu-programmer at90usb1286 erase seem to work, but then dfu-progammer at90usb1286 flash /path/to/firmware.hex fails with "Image did not validate"

Am I missing something here ? Or could there be a problem with the board ?

Thanks,

Nico
  • 0

nguillaumin
Waiting to connect to printer...
 
Posts: 5
Joined: 2013-Mar-Tue-04-Mar
Reputation: 0

Unable to flash firmware anymore

Sponsor

Sponsor
 

Re: Unable to flash firmware anymore

Postby plexus » 2013-Mar-Tue-10-Mar

With the power off move your Y so that it actuates the Y stop. then power up the printer, connect the USB to the computer and connect. let us know if this works.
  • 0

User avatar
plexus
Site Admin
 
Posts: 2113
Joined: 2011-Dec-Mon-16-Dec
Location: Toronto, Canada
Reputation: 95

Re: Unable to flash firmware anymore

Postby nguillaumin » 2013-Mar-Tue-16-Mar

Thanks for the reply,

I tried what you said, unfortunately it's still the same: board not recognized in default mode, and dfu-programmer unable to flash in BOOT mode.
I even tried with the other axes in case I made a cabling error ;)

Out of curiosity what was that supposed to achieve ? Is it putting the board in a special mode or something ?

Any other ideas ?

Thanks,

Nico
  • 0

nguillaumin
Waiting to connect to printer...
 
Posts: 5
Joined: 2013-Mar-Tue-04-Mar
Reputation: 0

Re: Unable to flash firmware anymore

Postby plexus » 2013-Mar-Tue-16-Mar

I have been digging into the thermistor tables in Marlin. this led me down a garden path that included many firmware flashes to my PBrd. then... it would stop connecting in what I will call "run" mode (not being an Arduino nerd) - when connecting to the computer i kept getting "5 commands waiting". turns out there is a documented, I'll call it bug, that requires the Y stop to be disconnected when powering up otherwise it puts the board into a state that you can't connect. i figured this out with the help of Laine who suggested there might be something plugged in that is locking up the board. so i went one by one over the connectors and found the Y stop to have this effect. i told Laine and he pointed out a post from June of last year documenting this bug!

So now my board works by ensuring the Y stop is home - this actuates the switch which opens the connection as the switch is wired in "normally closed" state. so you have to home it to disconnect the stop pin.

You said you are using dfu-programmer... are you on a mac? linux? do you have windoze? i am on a mac and was using dfu-programmer but switch to Amtel Flip. i run it under XP on Parallels and its much nicer to work with for flashing.

Back to your problem... when you say "board not recognized" exactly what are you getting that leads you to believe this? what message(s)?

Before we found my issue was the Y stop, consistent with the post from last year, Laine wanted me to go one by one through each thing plugged in to the PBrd, unplug it and try and connect. if it doesnt work, then plug it back in and move to the next thing. so try that and see if one of the things plugged in with release your board to connect. its a long shot i know. but i did it and found it was the Y stop.
  • 0

User avatar
plexus
Site Admin
 
Posts: 2113
Joined: 2011-Dec-Mon-16-Dec
Location: Toronto, Canada
Reputation: 95

Re: Unable to flash firmware anymore

Postby nguillaumin » 2013-Mar-Wed-04-Mar

Thanks for the details, that kind of makes sense ;)

I tried to unplug everything, but still the same: Board is not recognized by the OS when in non-BOOT mode. By "not recognized" in mean that Windows "sees" a new device, but is unable to find a driver for it. When the board was working at first Windows was recognizing it as a COM port. In Linux it's similar, when I plug it it gives me the following errors in /var/log/syslog:
Code: Select all
Mar 27 20:53:42 sam kernel: [   80.136120] usb 2-1: new full-speed USB device number 2 using uhci_hcd
Mar 27 20:53:42 sam kernel: [   80.260088] usb 2-1: device descriptor read/64, error 18
Mar 27 20:53:43 sam kernel: [   80.488126] usb 2-1: device descriptor read/64, error 18
Mar 27 20:53:43 sam kernel: [   80.704108] usb 2-1: new full-speed USB device number 3 using uhci_hcd
Mar 27 20:53:43 sam kernel: [   80.828106] usb 2-1: device descriptor read/64, error 18
Mar 27 20:53:43 sam kernel: [   81.056109] usb 2-1: device descriptor read/64, error 18
Mar 27 20:53:43 sam kernel: [   81.272120] usb 2-1: new full-speed USB device number 4 using uhci_hcd
Mar 27 20:53:43 sam kernel: [   81.307209] usb 2-1: device descriptor read/8, error -61
Mar 27 20:53:43 sam kernel: [   81.438175] usb 2-1: device descriptor read/8, error -61
Mar 27 20:53:44 sam kernel: [   81.708157] usb 2-1: new full-speed USB device number 5 using uhci_hcd
Mar 27 20:53:44 sam kernel: [   81.742234] usb 2-1: device descriptor read/8, error -61
Mar 27 20:53:44 sam kernel: [   81.874175] usb 2-1: device descriptor read/8, error -61
Mar 27 20:53:44 sam kernel: [   81.976141] hub 2-0:1.0: unable to enumerate USB device on port 1


lsusb doesn't list any new device.

I've tried both with dfu-programmer on Linux, and Atmel Flip on Windows. As said in my first post both are failing to flash, with different error messages.

Can the board be set in a "read-only" mode somehow that would prevent the flash from working ?
  • 0

nguillaumin
Waiting to connect to printer...
 
Posts: 5
Joined: 2013-Mar-Tue-04-Mar
Reputation: 0

Re: Unable to flash firmware anymore

Postby plexus » 2013-Mar-Wed-16-Mar

I am unsure about a read-only mode that can some how automagically get set. but... are you powering the board from a 12V supply and have the USB plugged in too? is the USBPWR jumper shorted out? on my board I shorted out USBPWR so i can power the board from USB only to make flashing easier.

If you are not even able to flash the board then there might be a board problem. the steps I use to flash are:

- plug the board into the computer, wait for USB device connect confirmation

- remove the jumper (on a rev B board. on rev D, add the jumper)

- press the reset switch, wait for device disconnect/connect noises from windoze

- run Flip. connect to device using USB in Flip. open the firmware hex file. ensure Erase, Program and Verify are checked. click Run

- it then gives me a progress bar for erase, load and verify

- disconnect the USB. close Flip.

- add jumper (remove for rev D). reconnect USB and connect to host and look for firmware echos

Perhaps if you can try it on another computer. another thing too is to ensure you have the right driver installed when its in bootloader mode by looking at your Device Manager.
  • 0

User avatar
plexus
Site Admin
 
Posts: 2113
Joined: 2011-Dec-Mon-16-Dec
Location: Toronto, Canada
Reputation: 95

Re: Unable to flash firmware anymore

Postby nguillaumin » 2013-Apr-Mon-21-Apr

Hi,

Yes I'm using the PSU in addition to the USB. I tried with a different computer with both Windows and Linux again but no luck :(
I guess I'll try to contact the support !

Thanks for all your help,

Nico
  • 0

nguillaumin
Waiting to connect to printer...
 
Posts: 5
Joined: 2013-Mar-Tue-04-Mar
Reputation: 0

Re: Unable to flash firmware anymore

Postby nguillaumin » 2013-Apr-Sat-02-Apr

I've got some news, I managed to get it working again !

Because I wasn't going anywhere with the built-in bootloader, I ordered an AVR programmer (USBTinyISP) to interact with the board.
Once connected to the USB programmer I was able to see that all the lock bits were set on the AVR, explaining why flashing didn't work. I've no idea how those lock bits have been set, but apparently I'm not the only one to run into this issue: http://blog.lincomatic.com/?p=548#comment-4227 and http://blog.lincomatic.com/?p=548#comment-4328

Following Lincomatic's instructions I was able to erase the lock bits and re-flash the DFU bootloader. I tried dfu-programmer again and now it works ! My printer's axes are moving again !
  • 0

nguillaumin
Waiting to connect to printer...
 
Posts: 5
Joined: 2013-Mar-Tue-04-Mar
Reputation: 0

Re: Unable to flash firmware anymore

Postby plexus » 2013-Apr-Sat-02-Apr

good news and good to know!
  • 0

User avatar
plexus
Site Admin
 
Posts: 2113
Joined: 2011-Dec-Mon-16-Dec
Location: Toronto, Canada
Reputation: 95

- POSSIBLE SOLUTION - Unable to flash firmware anymore

Postby CaptAwesome » 2014-Apr-Thu-21-Apr

Hello All
So just to start out, I am new here so if my terminology is wrong please accept my apology.
After printing for who know how long I finally had another board issue. My Y axis motor seemed like it wasnt getting enough power though the power setting was tirned up 80% and it was running only 1 Nema 17 stepper. After digging I found a post talking about the Y axis being "HOMED" when the printer is powered on (Y-axis limit switch is "closed" I think) either or. By the switch being engaged when power up has like a 1 and 50ish chance to lock the EEPROM and corrupt the firmware. This is what happened to me and after looking all over and under every stone, Every time the board goes to be reflashed and the Blank Check comes back bad, its been said the board is bricked and needs to be replaced. After all the reading and digging through the data sheet of the AT90USB1286 along with my knowledge of Cisco routers, I have my CCNA, I started messing around and was able to reflash and fix my issue.
I was getting the Blank Check 0x0000000 bad error (not exact error message in FLIP) The process as follows is what worked for me,

NOTE: This is the Printrbot board REV. D w/ AT90USB1286
Pay close attention to placement and orientation of all cables and placement.

Disconnect everything except for Y motor, Y limit sensor, Extruder temp sensor, Fan, Extruder, Power plug.
With board powered on, Place jumper on BOOT pins.
HOLD RESET button for a 30 count
Start FLIP
Select Device = AT90USB1286, ok
Select COMS = USB, OPEN
MENU>Device>ERASE
Unplug power from board, Unplug USB from PC
POWER ON BOARD FIRST with jumper still on then plug USB back in (leaving the USB plugged in causes the process not to work)
Select COMS = USB, OPEN
MENU>BUFFER>EDIT>EDIT>RESET
Load Hex
Make sure all 4 boxes in Operations flow are checked and hit RUN
The process then completed as normal with good Blank Check and Verify.
My Y axis motor now runs correct.
Reconnect all other associated cables and get back to printing {my next step ;)}

By no means am I saying that everything outlined above plays a part, but after working on this for quite some hours and looking under every rock, the solution was actually found by me making a mistake when messing around. Its funny how the quintessences just manifest from nowhere ;)

I hope this helps. ALSO, I am aware that links for the various programs and files were not linked. This is the way I see it, If you have put in just a little effort then everything above should be understandable and more than likely you already have exactly what you needed all along. Lokkie there, Yet again :)

Happy Printing
  • 3

CaptAwesome
Waiting to connect to printer...
 
Posts: 1
Joined: 2014-Apr-Thu-21-Apr
Reputation: 3


Return to Troubleshooting talk

Who is online

Users browsing this forum: No registered users and 1 guest

cron