Atxmega128D3 Hot to proper program fusebytes by atprogram.exe tool

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


Hello 

I want to program fusebytes for ATxmega128D3 using atprogram.exe tool and Atmelice programmer.

I see that fusebyte 0 ,fusebyte 3 are reserved in manual for that IC.

Is it correct if I wrote in cmd line seq for 6 fusebytes like below:

(I need to set up only 4 fuse bytes(AS7 has only 4) but in that tool looks must by 6 fusebytes (fuse0:FF and fuse3:FF) because without them fuse seqence after program was wrong.

Below my seq:

.\atmelICE\atbackend\atprogram.exe -t atmelice -i pdi -d ATXmega128D3 write -fs --values FF00FFFFF3EB --verify

 

Now when I run in AS7 it looks good but I m worried if I could set up FF to reserved fuse0 and fuse3.Is it safe or not.(I read that normally fresh IC also have FF setup from factory)

In AS7 only 4 fuse are visible like below.

If there anyone has  similar problem how to automate programmnig of fuse in that IC.

 

Below read fuse after atprogram run.

>

 

 

 

 

 

 

 

 

RobertWych

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


If you include the fuse setting in the program, there is no hassle.

 

#include <avr/io.h>

FUSES = {
    .FUSEBYTE1 = FUSE_FUSEBYTE1_DEFAULT,
    .FUSEBYTE2 = FUSE_FUSEBYTE2_DEFAULT,
    .FUSEBYTE4 = FUSE_FUSEBYTE4_DEFAULT,
    .FUSEBYTE5 = FUSE_FUSEBYTE5_DEFAULT,
};

int main(void){
    while (1){
    }
}

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This is an example of atprogram that writes a flash and a fuse at the same time.

 

atprogram -f -t atmelice -i PDI -d atxmega128D3 program --flash --fuses --verify --file GccApplication1.elf

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Hi KabaSan

It works now correctly. I used like you wrote elf file and then atprogram.

Thanks a lot!

RobertWych