bugAVR Downloader/UploaDEr - Bugs: bug #26620, Cannot write to fuse...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #26620: Cannot write to fuse bits[0,1,2,4,5]

Submitted by:  None
Submitted on:  Tue 19 May 2009 02:39:05 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedPrivacy: Public
Assigned to: Joerg Wunsch <joerg_wunsch>Originator Name: Martin Edney
Originator Email: -unavailable-Open/Closed: Closed
Release: NoneProgrammer hardware: 
Device type: 

Tue 19 May 2009 02:39:05 PM UTC, original submission:

I can read the fuse bit value FUSE[0,1,2,4,5] but cannot right to them. i have found where in the stk500v2.c code where it should be declared but it is not, I am using the ATXMEGA128A1 and avrispv2.

Command prompt:

avrdude -c stk500v2 -p x128a1 -P usb -u -U fuse0:w:0xff:m

G:\PRODUCTN\AVRDUDE\Brunel\A50-0232LF_Brunel Camera>avrdude -c stk500v2 -p x128
a1 -P usb -u -U fuse0:w:0xff:m

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e974c
avrdude: reading input file "0xff"
avrdude: writing fuse0 (1 bytes):

Writing | | 0% 0.00savrdude:
stk600_xprog_write_byte(): unknown memory "fuse0"
***failed;
Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of fuse0 written
avrdude: verifying fuse0 memory against 0xff:
avrdude: load data fuse0 data from input file 0xff:
avrdude: input file 0xff contains 1 bytes
avrdude: reading on-chip fuse0 data:

Reading | ################################################## | 100% 0.02s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
0xff != 0x7f
avrdude: verification error; content mismatch

avrdude done. Thank you.

G:\PRODUCTN\AVRDUDE\Brunel\A50-0232LF_Brunel Camera>PAUSE
Press any key to continue . . .

stk500v2.c code...

static int stk600_xprog_write_byte(PROGRAMMER * pgm, AVRPART * p, AVRMEM * mem,
unsigned long addr, unsigned char data)
{
unsigned char b[10];

/*
* Fancy offsets everywhere.
* This is probably what AVR079 means when writing about the
* "TIF address space".
*/
if (strcmp(mem->desc, "flash") == 0) {
b[1] = XPRG_MEM_TYPE_APPL;
addr += 0x00800000;
}else if (strncmp(mem->desc, "fuse", strlen("fuse")) == 0) {
b[1] = XPRG_MEM_TYPE_FUSE;
addr += 0x008f0000;
)else if (strcmp(mem->desc, "boot") == 0) {
b[1] = XPRG_MEM_TYPE_BOOT;
addr += 0x00800000;
} else if (strcmp(mem->desc, "eeprom") == 0) {
b[1] = XPRG_MEM_TYPE_EEPROM;
addr += 0x008c0000;
} else if ( (strcmp(mem->desc, "lockbits") == 0) || ((strncmp(mem->desc, "fuse", 4)) == 0) )
b[1] = XPRG_MEM_TYPE_LOCKBITS;
addr += 0x008f0000;
} else if (strcmp(mem->desc, "usersig") == 0) {
b[1] = XPRG_MEM_TYPE_USERSIG;
addr += 0x008e0000;
}else {
fprintf(stderr,
"%s: stk600_xprog_write_byte(): unknown memory \"%s\"\n",
progname, mem->desc);
return -1;
}

Can you help?

Anonymous

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by joerg_wunsch (Updated the item)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 01 Jul 2009 03:59:20 PM UTCjoerg_wunschStatusNone=>Fixed
      Assigned toNone=>joerg_wunsch
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1