суббота, 28 апреля 2007 г.

AVR-IO-M16 Fuses Fine, But Stopped Programming

I bought an AVR-IO-M16 and was working on a program for it. Everything was going fine and I was compiling and downloading programs to the board, testing etc. Then, it suddenly stopped programming. The fuses are should all be fine since it was programming before and all I was doing was downloading programs to flash, not changing fuses. I'm using an STK-500 to program. I've verified that the STK-500 is still fine by programming an AVR-P28 that I also bought. Programming it with the same cable, same program, same STK-500 works without problems.

So...any suggestions about what might have happened? The chip continues to run when I apply power so the Atmega16 isn't fried. Is it possible for the ISP programming part of the chip to fry while the rest still works? Unfortunately, the Atmega16 is SMT soldered to the board or I'd take the chip out and try to program it directly in the STK-500. Because of that I also can't high voltage program the chip, or at least I can't think of a workable way to do that. Any advice about how to get it to program again? There is a JTAG port on the board. Might using JTAG work? (I don't have a JTAG device, but maybe I can find someone who does if that might help.)

Any and all suggestions appreciated.

Thanks,

Eric
Back to top
View user's profile Send private message
AliasMrJones



Joined: 29 Sep 2006
Posts: 7


PostPosted: Fri Sep 29, 2006 11:52 pm Post subject: Reply with quote
Quick update. Though trying different things I have been able to program the chip again, but there is still a problem.

I removed the VTarget jumper to remove power from the target board and I was able to read fuses and download a program to flash. But -- only the FIRST operation to the board works. Every subsequent operation fails until power to the STK-500 is turned off and then on again. Then one operation and every operation after that fails until power is cycled again.

I can read fuses once after turning the STK-500 on, then I get garbage when reading fuses the next time. After reading fuses, programming also fails. If I read fuses, turn off STK-500, turn on STK-500 then program, it works. If I try to read or verify program, it fails. If I turn power to STK-500 off and then on it works the first time and fails after that.

Any suggestions what might be going on ?
Back to top
View user's profile Send private message
stevech



Joined: 05 Jun 2004
Posts: 194


PostPosted: Sat Sep 30, 2006 7:42 am Post subject: Reply with quote
I'm sure you've checked this: is there a good common ground between the two?
Back to top
View user's profile Send private message
AliasMrJones



Joined: 29 Sep 2006
Posts: 7


PostPosted: Sat Sep 30, 2006 2:55 pm Post subject: Reply with quote
stevech wrote:
I'm sure you've checked this: is there a good common ground between the two?


Yes, I'm using the 10 pin programming header from the stk-500 through the cable that came with the stk-500 to the olimex board. Vcc and Gnd are coming from the stk-500 through the cable.

I have a new AVR-JTAG that I cannot get to work with AVR Studio 4.12 SP3.

It seems to work fine with AVR Studio 4.12 build 460, but when I upgrade to SP2 (build 473) or SP3 (build 490) and attempt to connect to the target, I get a dialog informing me that a firmware upgrade on the JTAG device will be necessary.

AVR studio fires up AVRprog, and when I click "Program" in the "Flash" box, the device programs for a while, but then it pops up a messagebox that states
Quote:
Address: 0x5e5, Expected: 0xe8000, Received: 0xe70f



I have repeated this across two machines, one with a USB-serial converter and one with an on-board serial port. In both cases, it works with 4.12 build 460 and fails with SP3.

For what it's worth, my target is a Butterfly board with the JTAG-VCC-enable jumper (R402) populated.

Last edited by DavidR on Wed Aug 30, 2006 6:25 pm; edited 1 time in total
Back to top
View user's profile Send private message
DavidR



Joined: 17 Aug 2006
Posts: 2


PostPosted: Sun Sep 10, 2006 7:12 pm Post subject: Reply with quote
I'd seen the upgrade instructions at http://www.olimex.com/dev/avr-jtag-upgrade.html, but I had assumed they didn't apply to the new unit I had just purchased.

I was wrong: those instructions solved my problem.
Back to top
View user's profile Send private message
OLIMEX



Joined: 09 May 2003
Posts: 503
Location: Bulgaria

PostPosted: Thu Sep 14, 2006 10:06 am Post subject: Reply with quote
Hi,
it'e very important when you do upgrade to be sure that your target is with Vcc above 3V and can supply 50-70mA to JTAG which are necessary during the upgrade process, if your power supply is weak or noisy and glitchy your upgrade process may stop and your firmware get corrupted than you have to follow the web instructions to manually enable the bootloader in AVR-JTAG

Best regards
Tsvetan
Back to top
View user's profile Send private message Visit poster's website
knipsknaps



Joined: 23 Sep 2006
Posts: 2


PostPosted: Sat Sep 23, 2006 2:53 am Post subject: Similar problem with USB-JTAG Reply with quote
Hi,

I have bought some weeks ago the USB-JTAG for AVR from Olimex and want to connect that today for the first time. It occupied first COM9 and AVR-Studio recognized it, but wanted to upgrade. Starting the upgrade leads to an error.

Then I removed the COM-port in the device manager to COM2. With this setting AVR studio even does no longer recognize the USB-JTAG and of course will not ask to upgrade.

What is the correct way to deal with this situation ?

My AVR-Studio is 4.12 SP3 Build 490

Looking forward some hints....

Regards,

knipsknaps Crying or Very sad
Back to top
View user's profile Send private message
OLIMEX



Joined: 09 May 2003
Posts: 503
Location: Bulgaria

PostPosted: Sat Sep 23, 2006 3:07 am Post subject: Reply with quote
AVR Studio upgrade only if COM port is COM1 or COM2
of course if you remove the virtual com port you will not able to connect
you should not remove just change it to COM1 or COM2 with the properties of the virtual com port

if you removed the virtual com port you may need to re-boot your computer and try again

Tsvetan
Back to top
View user's profile Send private message Visit poster's website
knipsknaps



Joined: 23 Sep 2006
Posts: 2


PostPosted: Sat Sep 23, 2006 5:57 am Post subject: Olimex USB Jtag Reply with quote
Thanks, now it works....

really strange to know that AVR studio only supports COM1 and COM2 for updating.

Knipsknaps
Back to top
View user's profile Send private message
Baiy000r



Joined: 24 Sep 2006
Posts: 1


PostPosted: Sun Sep 24, 2006 9:30 am Post subject: Reply with quote
Hi

I have a new AVR-JTAG-USB. After the firmware upgrade with AVR Studio 4 (Version 4.12, Build 490, Service Pack 3) the LED from the device isn't glowing anymore. Programming the flash of the AT90CAN128 results to an error (like this: Address: 0x5e5, Expected: 0xe8000, Received: 0xe70f). Reconnecting now to the device isn't possible. I closed AVR Studio, switched the power supply off and then on again. The LED from the AVR-JTAG-USB is glowing. I started AVR Studio, connected to the AVR-JTAG-USB and AVR Studio asked me if I want to upgrade the device. I clicked on the OK button. The LED isn't glowing anymore. Programming results the same error. Reconnecting isn't possible. I made the same as before but now is connecting to the device impossible. But in the device manager the AVR-JTAG-USB is still available.

Should I use the upgrade instructions at http://www.olimex.com/dev/avr-jtag-upgrade.html?

Best regards,
Baiy000r

Комментариев нет: