Home Forum XMEGA Xprotolab Help! Corrupted my firmware. How to fix?
 Gabotronics Forum :: XMEGA Xprotolab
Welcome Guest   
 Subject :Help! Corrupted my firmware. How to fix?.. 2017-07-14 06:33:49 
Statik
Joined: 2017-06-08 07:06:24
Posts: 4
Location

Hi all,

I'm currently in computer engineering at a Dalhousie University and we use an ATMega644A in our projects. They use a USB loader that programs the microcontroller that I use avrdude in Eclipse to program. I'm also a Linux Mint 18.2 user. I was trying to program another microcontroller I had found and accidentally had my xprotolab-plain also connected at the same time. Now the xprotolab does not function. I have the hex and eep files here but I'm not sure how to proceed.

The command that eclipse ran when both devices were connected was:

Launching /usr/bin/avrdude -p8535 -cavrftdi -Uflash:w:AT90LS8535Test.hex:a
Output:

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9303 (probably 8535)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "AT90LS8535Test.hex"
avrdude: input file AT90LS8535Test.hex auto detected as Intel Hex
avrdude: writing flash (104 bytes):

Writing | ################################################## | 100% 0.41s

avrdude: 104 bytes of flash written
avrdude: verifying flash memory against AT90LS8535Test.hex:
avrdude: load data flash data from input file AT90LS8535Test.hex:
avrdude: input file AT90LS8535Test.hex auto detected as Intel Hex
avrdude: input file AT90LS8535Test.hex contains 104 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.10s

avrdude: verifying ...
avrdude: 104 bytes of flash verified

avrdude done.  Thank you.

avrdude finished

 

With the USB cable only connected to the xprotolab-plain, I tried running:

avrdude -px32a4u -cflip2 -U application:w:Xprotolab-Plain.hex:i

avrdude: Error: No matching USB device found
avrdude: AVR device initialized and ready to accept instructions

Reading |                                                    | 0% 0.00savrdude: error reading signature data for part "ATxmega32A4U", rc=-1
avrdude: error reading signature data, rc=-1

avrdude done.  Thank you.

So now I'm stuck. Any help appreciated.

 

Statik

IP Logged
 Subject :Re:Help! Corrupted my firmware. How to fix?.. 2017-07-28 03:54:55 
Statik
Joined: 2017-06-08 07:06:24
Posts: 4
Location
Hi all,
Since there was no reply, I had to go really digging. I did end up fixing the problem. Here's what I did, just for reference for others.
First, I had to get a PDI capable programmer since I only had ISP capable ones. I ended up ordering the ZeptoProgII from here: https://www.mattairtech.com/index.php/zeptoprog-ii.html
It is compatible with Windows and Linux(which I use).
When it arrived, I downloaded the firmware from the website for my xprotolab-plain. I soldered 6 pins into the open port at the end of the xprotolab-plain, with the pins facing the same direction as the interface pins, and connected the ZeptoProgII to the xprotolab-plain using the included 6-pin connector. I followed the trace from the PDI pin on the xprotolab-plain to figure out which pin was pin 1, which is also the pin marked with a square on the silk screening. I then used the following commands:
avrdude -c avrisp2 -p x32a4u -U application:w:Xprotolab-Plain.hex:i
avrdude -c avrisp2 -p x32a4u -U eep:w:Xprotolab-Plain.eep:i

And it successfully updated the firmware and I have my Xprotolab-Plain working again!

Hope this helps anyone else in this situation.

Statik
IP Logged
Page # 


Powered by ccBoard