Welcome! Log In Create A New Profile

Advanced

Uploading firmware to motherboard

Posted by DARY 
Uploading firmware to motherboard
October 04, 2010 03:17PM
Hi

I seriously need some help.

When uploading to motherboard I get the well known:

avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51.

I have tried everything sugested - here and on the arduino forum. This means:
- The reset trick. Pushing reset before, after while uploading to board.
- Changing settings for the com port and in the board.txt file.
- Plugging/replugging USB on different time of the upload
- Actually made a new motherboard - same issue
- Tried 3 different UM232R modules
- Rewired the cables
- Reinstalled the drivers for UM232R
- Disabled antivirus and firewall in windows.
- Tried running on 3 different pc's (including 2 different Win7 virtual XPModes)
- Reburned the bootloader
- Propably more I forgot.

Here is what happens:
When attaching the USB to pc, the debug led on motherboard flashes rapidly for a few second, then stops.
If pushing reset the debug led flashes 3 times rapidly, 1 second wait and then another flash.
When uploading to board the debug led flashes 3 times rapidly, 1 second wait(means the rest is correctly sent to board) but then the led constantly lights up and 5-10 seconds later the message "Not in sync" appears.

I have attached a screendump from when I burned the bootloader.

I am using a laptop with Win7 Home Premium Edition, also tried on desktop pc with Win7 Ultimate Edition. Same story.

Any suggestion is much appreciated. Any other info needed just ask.

Best Regards
DARY
Attachments:
open | download - bootloadet.JPG (72.9 KB)
Re: Uploading firmware to motherboard
October 04, 2010 10:16PM
I'm running windows 7 preimium as well. I had the same problem and it was due to one of the pins on the cable between the UM232R and the mb being loose. Note: I sitll need to holder rest, release it , then click upload immediately for it to work. Do you have issues uploading to the extruder controller as well?
Re: Uploading firmware to motherboard
October 05, 2010 02:15AM
Hi

Thanks for the response. Well, actually didn't try uploading to the extruder yet - but as mentioned tried 2 different motherboards.
I am curious about the debug led. When you had the problem uploading - did yours aswell blink and then light up constantly?

Also a little curious about the wires connection 2(#CTS). On the Motherboard it is connected to ground - is that right or at least needed?
VDX
Re: Uploading firmware to motherboard
October 05, 2010 04:21AM
... i'm uploading firmware to the "motherboard 1.2" with a 4-pin-USBtoRS232-adapter, where GND is wired to the (grounded) pin 2.

For the "extruder 2.2" i need the 6-pin-adapter or it won't work.

Have you tried with reversing the TxD/RxD-pins?


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: Uploading firmware to motherboard
October 05, 2010 07:51AM
Hi

I have the 6-pin USBtoRS232 adapter from FTDI which was recommended in the Reprap Wiki.

Okay so all you use for the 4 wire is(on the motherboard):
2 = GND
3 = VCC
4 = RX
5 = TX
??

BTW the pin 1 and 2 are physically connected on the PCB, so it doesn't matter which one to use for GND. Thats why I was curious about the #CTS connected to pin 2 in the diagram.

No haven't try to reverse - but will certinately try to do that to see if that helps.

Thanks.
VDX
Re: Uploading firmware to motherboard
October 05, 2010 07:56AM
DARY Wrote:
-------------------------------------------------------
> Okay so all you use for the 4 wire is(on the
> motherboard):
> 2 = GND
> 3 = VCC
> 4 = RX
> 5 = TX
> ??

... correct, i can leave pin1 and pin6 open while programming the motherboard ... but this won't work with the extruder ...

For RxD/TxD you have to check, if you have to cross them or not - i have some controllers with MAX232, where i have to connect RxD from the Interface to TxD on the board, and TxD to RxD ...


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: Uploading firmware to motherboard
October 05, 2010 09:44AM
Here is a diagram of how mine is wired. I keep the mb wired the same for flashing and for normal operation. For flashing the extruder, i flip the 6 pin cable over as the extruder ground is at the top while the mb ground is at the bottom.

Here is a diagram of how i have everything wired.Wireing diagram
Re: Uploading firmware to motherboard
October 05, 2010 02:05PM
Thank you for the responses.

Unfortunately nothing works. I flipped the TxD/RxD, with only result that the debug blinks in a different way. No constant light on.
I cannot program the extruderboard either. Here the debug led doesn't blinks at all when uploading - only the 1 second on / 1second off which showing the bootloader is in the chip.
My only conclusion for this. There is something wrong with the pc or windows.

Anyone knows how important the settings for the serial com converter in device settings in windows are? Does they have to match up with the board.txt? If so, how about the Stop Bit, Parity Bit etc...

DARY
VDX
Re: Uploading firmware to motherboard
October 05, 2010 03:26PM
Hi DARY,

the debug-LED in the extruder won't blink while programming! ... and the motherboard-LED will display fast changing pulses while programming and then show the slow 'heartbeat' ...

I didn't change anything with the serial port, but if i remember correct, my baudrate setting with Arduino0019 was 19200 BAUD and the new firmware is coded to 57600 BAUD - so you have to check, what's correct for your version ...


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: Uploading firmware to motherboard
October 06, 2010 05:56AM
Hi Viktor

But the reset trick might be used on the extruder board while downloading aswell?

I have tried Arduino-18, -19 and -20. Same issue with all of the. Maybe I should try downloading the software again, to go back to original settings in the boardfile.

DARY
VDX
Re: Uploading firmware to motherboard
October 06, 2010 06:00AM
... it may be the difference between 19200 Baud with the old and 57600 with the newest firmware - check the BAUD-settings in the serial setup and in the firmware!

AFAIK for uploading the extruder i had to press the reset button shortly after starting the download, not waiting when the size is printed ...


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: Uploading firmware to motherboard
October 06, 2010 06:43AM
Thanks.

I will try do this later today.
Besides that I have an old laptop with serial com port. I will try this if nothing else works, to skip the USBtoRS232 module.

DARY
Re: Uploading firmware to motherboard
October 06, 2010 05:09PM
Hi

I managed to download the programcool smiley. That is the positive side, but the negative is I don't know how and why.
I tried to make and use a RS232 cable connected directly to the pc's com port. That gave the exact same result with the constant light on debug led. Then I just wanted to give another shot with the USBtoRS232 adapter - checking the wires and so. First try downloading succeeded - even without touching the reset button. So for now I will give it a break and try again later. Maybe I can figure out what went wrong first. My guess is still so far something with the windows settings.

Thanks for your replies. Never the less much appreciated.
DARY
Re: Uploading firmware to motherboard
October 08, 2010 01:55PM
Okay. The problems are back. I can't upload to the board again. The only thing i have done is updating Java, which was necessary to run the RepRap software. The software perfectly communicate with the board - making one of the stepper motors spin. This means the board works, the wiring are okay and the USBtoRS232 is okay. So why I can't upload is the question.
This is my currently configuration:

Win 7 64 Home Premium
Java Runtime 64bit JRE 6 update 21
Arduino version tested 18 - 21

I tried uninstalling Java 6 and installed Java version 5 instead. No luck
Anyone with a brilliant idea?


DARY
Re: Uploading firmware to motherboard
October 09, 2010 10:30AM
I've found the best way to update the firmware on the mobo is the following. Plug in the usb, then immediately plus upload firmware.
Re: Uploading firmware to motherboard
October 09, 2010 03:41PM
It works again.
By seetting the baudrate of COM port in windows settings to 57600 and in the board.txt for Sanguino to 38400.
Don't ask me why. I neither have to touch the resetbutton at all.

Over and out

DARY
Sorry, only registered users may post in this forum.

Click here to login