Welcome! Log In Create A New Profile

Advanced

Sanguino built, but "not in sync"

Posted by Sander 
Sanguino built, but "not in sync"
December 23, 2008 09:51AM
Hi all,

i just received my Sanguino parts by mail from RRRF and soldered everything together. It was quite easy to do.

Unfortunatly i'm not able to upload anything to the board. I get this error (Arduino 0012 in Windows):
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51
I'm quite sure i selected the right COM-port and selected the Diecemilla as board-type.

In other forums i've read that the Atmel644 comes preprogrammed with a sketch, which should start blinking the red-LED after booting. The green-LED does light up constantly (power-led), but no red-yet :-(. Does the CPU come preprogrammed with the boot-loader from RRRF?

thanks in advance,
Sander (The Netherlands)
emt
Re: Sanguino built, but "not in sync"
December 23, 2008 10:05AM
First you have to follow the software set up instructions on the Sanguino web site.

[sanguino.cc]

You will then be able to select the Sanguino as the board type.
If you are using the latest firmware release from the SVN you may well find you then get a different error on compile. To get round this at the moment use Arduino 0011.
At this stage you should get a clean compile.
You may then find you cannot download and get the error already reported. To overcome this hold the Sanguino reset button, start the download and hold the button for a further 10 seconds. This reportedly solves the download problem for most users.
I find I have to disconnect the USB at the Sanguino end wait a couple of seconds and plug back in and IMMEDIATELY click the download button. This works for me 9 times out of 10.


Regards

Ian
Re: Sanguino built, but "not in sync"
December 23, 2008 11:29AM
Hi Ian,

i can compile correctly. But unfortunatly the error remains the same. Pushing the reset-button for a longer while does not solve the problem.

thanks anyway, Sander
emt
Re: Sanguino built, but "not in sync"
December 23, 2008 11:55AM
Hi

You have selected Sanguino as the board type? You said Diecemilla in your first post.


Regards

Ian
Re: Sanguino built, but "not in sync"
December 23, 2008 02:44PM
Hi Ian,

You are right. In my first post i did state that i selected the Decemilia. At first i wasn't aware of the extra software (v1.3) i had to install. At this time i do have downloaded and installed the Sanguino-software correctly. I've also selected the Sanguino-option as the board-type.

The thing is, that i suspect the Sanguino doesn't respond at all on the serial-output. This because the error is the same with and without the Sanguino connected to the the usb->serial-cable.

I really hope that i didn't mess-up with soldering and bridge connections. I think i did a good job and am quite sure i didn't bridge connections.

But Ian.. Maybe you have an answer to the question if RRRF ships the 664P's with or without bootloader pre-uploaded?

thanks, Sander
Re: Sanguino built, but "not in sync"
December 23, 2008 03:24PM
When you press the reset button the red led should flash a few times as it invokes the boot loader.

If it doesn't flash you may have gotten a blank CPU that hasn't been flashed yet.

Note the pinout assignments when you get to wiring it up for a darwin or repstrap are quite different from the Arduino. Also the flashing led example for the Arduino uses pin 0 on the Sanguino.

See: [forums.reprap.org]
Re: Sanguino built, but "not in sync"
December 23, 2008 07:21PM
For one, you definitely want to select the Sanguino, not the Diecemilla, as others have commented.

Check your power LED. Is it *bright* green, same as most display LEDs are? If for some reason the board is not switched to USB power, but you have it hooked up via the USB>TTY cable, the LED will light up a muted green as if it is receiving power, however the Sanguino will not boot. If it is, unplug it from the computer and check inside the switch - there was a little bit of cruft inside one set of contacts when I got mine that was preventing the switch from closing on the USB side!

The error message you're getting from the Arduino console is basically the "nothing connected" message - It's talking to a COM port, but not getting anything back in response.
Re: Sanguino built, but "not in sync"
December 24, 2008 03:22AM
Huh!?
It started to work automagically this morning! I've not changed anything in the hardware and/or software. I can only imagine the order of connecting the Sanguino and the usb->serial-cable is different.

Thanks everybody for your help.

Now i'm finally able to continue with my Home Automation Project.

Sander (The Netherlands)
jet
Re: Sanguino built, but "not in sync"
December 24, 2008 11:45AM
I just built mine, and other than reversing the power/debug LEDs, I don't think I screwed anything up. But on the Mac, I'm having the same connection problem and no blinking LEDs after I press reset.

So this:

>If it doesn't flash you may have gotten a blank CPU that hasn't been flashed >yet.

Just means I need to bootload it, right?
Re: Sanguino built, but "not in sync"
December 25, 2008 11:11PM
I've just built a Sanguino myself, and have been having very similar problems. The error message is exactly the same, but it seems to happen intermittently. Sometimes pushing the reset button after the upload button seems to work, sometimes it doesn't. Shouldn't having the auto-reset jumper on automatically reset the sanguino when the computer attempts to connect to it? Why does pushing the reset button sometimes work?

Are there any other tools that could consistently upload to the sanguino, or steps I may have forgotten in installing the arduino software?

On an unrelated note, how would you program the sanguino using avr-gcc? What libraries would you need? And how would you upload it? I know that the arduino software uses avr-gcc as its compiler, and I was wondering how to write for the sanguino in assembler or c/c++. Of course, being able to upload any code at all is a necessary first step.
Re: Sanguino built, but "not in sync"
December 26, 2008 05:15AM
Hi Jet,

I also thought I had a blank one received, but that eventually wasn't true.
The upload en reset-button trick seems unlogically, but probably does work.

1. Select the Sanguino and correct COM-port from the IDE menu.
2. In the IDE compile the sketch
3. Press the upload-button
4. Press the reset-button on the Sanguino and count 10 seconds. And count real seconds, dont smuggle when being impatience.

Hopefully this will bring you succes..

The autoreset function doesnt work at this time ... Thus uploading is somewhat more complex than in comparison to the Arduino i had.. But nevertheless, the Sanguino is really cool...
Re: Sanguino built, but "not in sync"
December 26, 2008 10:19AM
What can be done to fix the auto reset functionality? How is it supposed to work?
Re: Sanguino built, but "not in sync"
December 26, 2008 11:53AM
Samuel Wrote:
-------------------------------------------------------
> What can be done to fix the auto reset
> functionality? How is it supposed to work?

I think it is more a matter of the Arduino software not closing and re-opening the port before a upload attempt.

My terminal emulator program has a re-connect button that does this and it definately resets the Sanguino.

Here's something you might try (I am traveling right now, so I can't). Under tools for serial port, uncheck the serial port that is selected so it frees the port. Wait a couple of seconds and then click the upload button at which time the software will re-open the port.
Re: Sanguino built, but "not in sync"
December 26, 2008 02:19PM
Would using the avr-gcc uploader, avrdude, work better? Of course, this would require using the rest of the avr-gcc tool chain as well.

Alternatively, is there any way to modify the arduino source to force reconnection?

Also, why doesn't Zach redistribute a modified arduino ide customized for sanguino? That way it is a) debugged for sanguino and not affected by arduino's changes and b) less work for the rest of us smiling smiley

-Samuel
Re: Sanguino built, but "not in sync"
December 27, 2008 04:09PM
Ok, update:

I have learned how to use avr-gcc and avrdude to program the Sanguino, and it's not really all that hard. However, I still have to push the reset button. It's more reliable though, in that it always works if I push the button. What I'm wondering is, do you know of anyway to tell linux to reset the serial connection from the command line, so that I don't have to manually push the button on the Sanguino? (I know, I'm lazy)

Other than that minor annoyance, and my limited knowledge of avr libraries, programming using the avr-gcc tool chain is very easy, and doesn't require the really-slow Arduino ide.

-Samuel

Edited 1 time(s). Last edit at 12/27/2008 04:10PM by Samuel.
Re: Sanguino built, but "not in sync"
January 18, 2009 05:43PM
IIRC, there's a command-line "reset the arduino" tool in enriques' skeinforge package. If there isn't, then I made one. Find it attached. Hrm.. Nevermind. In current form it resets the arduino, and then waits for the "ok" response when the bootloader has finished and the g-code firmware is waiting for commands. It is included in skeinforge, and even if you don't know python, it should be fairly easy to modify it to NOT wait for that response.


--
I'm building it with Baling Wire
Sorry, only registered users may post in this forum.

Click here to login