Orangutan X2 with VNH3 Programming Troubles

Hello people.

I am having trouble programming an Orangutan X2 with VNH3 using a Windows 7 machine. First I tried using Atmel Studio 6, and I kept getting an error saying that “The signature of the attached tool is AVRISP_2, which is unexpected”… so I tried updating the firmware on the Orangutan using Terma Term Pro as suggested in the user’s guide. But then I realized that I had uploaded firmware for the ATMEGA168p slave processor when the Orangutan I’m using sports a 328p…

After that I read somewhere that Atmel Studio 6 is incompatible with the Orangutan X2 and I tried using avrdude with the following command:

I tried the above command with different arguments for the programmer (-c) and the device (-p) but it still gives me this:

I am 100% sure the COM port is correct because the device manager lists the Pololu to USB Serial Adapter on COM1.

I am really stuck at this point… If anyone can help me I would appreciate it.

Hello.

Does it look like the X2 is working properly after the firmware update? For example, can you put it into programming mode by holding the reset button for half a second? (Which also leads to my next question: are you putting it into programming mode before you try to program it?)

Assuming the firmware update was successful and you can put the controller into programming mode, can you try the following avrdude command:

avrdude -p m1284p -P COM1 -c avrispv2 -U flash:w:test.hex

- Ben

I have been putting it into programming mode, but I’m not sure if it’s working anymore after the firmware update. When I hold the reset button for half a second, the Orangtuan makes a little beeping sound (as it always has) and the yellow LED stays lit until I remove my finger from the button. Before the update the yellow LED always stayed lit until I took it out of programming mode.

I tried the new command you suggested and now the command prompt tells me this every few seconds until I exit the command prompt:

If the yellow LED isn’t staying lit when you release the reset button, something is wrong. Which firmware version did you try to load? Did the upgrade appear to work properly? Can you try again with 1.02, and if that doesn’t work, can you try with 1.01?

- Ben

I have tried both 1.01 and 1.02. It is currently running 1.02, although there doesn’t seem to be any difference.

When I used Tera Term to upgrade the software, it printed out something like

and in the guide it was displayed as

where the asterisk signifies a successful upgrade… So I don’t think the upgrades worked properly.

I hope it’s that you are doing something wrong, but we’ll try upgrading one here following those same instructions and see what happens. I’ll get back to you later today or tomorrow with what we find.

- Ben

I just saw a post from you that said:

But now it appears to be gone. Were you able to get it working? From your earlier posts, it looks as if you might not have been following step 6 of the upload instructions properly. Specifically, before you upload the file, you need to type “load”, and you should see “LOAD:” echoed back to you. Next you need to type “s”, and you will see “S” echoed back. Ultimately, you should be seeing something like

in the terminal window.

- Ben

I got the firmware back to normal at least, but I still can’t load programs onto it. AVRDUDE says that the device signature is incorrect… So I tried to override that check with the “-F” argument, and the programming seems to have gone successfully, but when I restart the device or take it out of programming mode nothing happens. I loaded the “buzzer1” program onto it, so it should be making some sounds.

What is your AVRDUDE command? Are you using the library specifically for the X2 (i.e. libpololu_atmega1284p_x2.a)?

Can you try uploading the precompiled X2 demo hex file and see what that does?

- Ben

I’m using avrdude -p m1284p -P COM1 -c avrisp2 -U flash:w:x2-demo-program.hex -F

Yes I am using the appropriate library.

I uploaded the demo program and nothing happened. I also tried pressing the user buttons to see if I could get it to do anything, but that didn’t help.

After programming, are you taking it out of programming mode? If you don’t use the -F argument, what device signature is it getting?

- Ben

Yes I am taking it out of programming mode. The device signature I’m getting is

and AVRDUDE says for ATMEGA1284p the correct signature is

The device signature it’s getting is for an ATmega644A, the MCU we used to put on the Orangutan X2. Where and when did you get your X2? Can you look at the user-programmable MCU and see what is printed on it?

- Ben

I’m borrowing the device from someone else, so I don’t know where he got it, but it says 2006 on the board. I’m guessing its not a 1284p then.

The “2006” isn’t a good indication because we did not change the PCB at all when we switched to the 1284P; the best way to tell is just to pull off the top board and look at the writing on the IC. However, it certainly sounds like you have an original X2. Can you try using our 644p library and see if that code works? Also, can you try using the correct AVRDUDE MCU (ignoring the device signature mismatch probably isn’t a good way to go)? I expect it to be something like m644, m644a, or m644p.

- Ben

Yeah sorry I just left for vacation and I didn’t have time to take a look at the board more closely. I will try your suggestions when I get back in a couple of days.

Have a good vacation; please let me know what you find out when you get back!

- Ben

Thank you! And I most certainly will.

Ok, I am back from vacation and I solved the problem! It is in fact a 644p instead of a 1284p; I used the “m644” argument with AVRDUDE and a hex file from the 644 library instead of the 1284 one. Thanks for your help!

I’m very glad to hear that was the whole problem! Thanks for letting us know.

- Ben