0

I have an ATXMEGAA3BU processor and I use a CrossPack on my MacOS. I would like to use my old USBASP pragrammer which is "configured" to programm the CPU through the PDI interface - that is not a problem. The problem is that I do not know how to setup the FUSES on this ATXmega.

For ordinary CPU like ATMega8 the sequence in the Make file was simple.
Just use this: FUSES = -U hfuse:w:0xd9:m -U lfuse:w:0x24:m
But the Xmega has five FUSEBYTES and I have a problem with them... so the simple question is "how to change e.g. JTAGEN from 0 to 1"? It is located in teh FUSEBYTE4 as bit 0. How to tell the CrossPack (avr-dude) to change this or other from e.g. FUSEBYTE0?

Thank you...

kamh
  • 65
  • 8

3 Answers3

0

Maybe this is related to Robotics StackExchange. But I will try to answer here.

If it's possible for you to switch to windows, The fuse bit changing progress is very easily done with CodevisionAVR. With just some single clicks it's done. and it doesn't have the headaches of this terminal commands.

Miro Markaravanes
  • 3,285
  • 25
  • 32
0

Please refer to the datasheet for xmega a3bu at : http://www.atmel.com/Images/Atmel-8331-8-and-16-bit-AVR-Microcontroller-XMEGA-AU_Manual.pdf

The name of the fuse bytes are: FUSEBYTE0, FUSEBYTE1, ... FUSEBYTE5. There's no FUSEBYTE3. Have you tried

-U fusebyte0:w:0xd9:m -U fusebyte1:w:0x24:m -U fusebyte2:w:0x24:m and so on. You could give it a shot with exercise precaution while calculating the fuse bits and the lock bits.

Rishab Jain
  • 51
  • 1
  • 3
0

I know this is probably too late for OP, but for others (like me) who come across this question, you can also add

FUSES =
{
    0x00,//sets jtag address
    0xAA,//fuse byte 1
    0x9D,//f byte 2
    0x00,//unused
    0xDE,//f byte 4
    0x1E //f byte 5
};

to the top of your main.c file and the compiler / programmer will take care of flashing them.

Tested on xmegaA4.

cguest
  • 71
  • 5