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]

Submitter:  None
Submitted:  Tue 19 May 2009 02:39:05 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Privacy:  Public
Assigned to:  joerg_wunsch Originator Name:  Martin Edney
Originator Email:  -email is unavailable- Open/Closed:  Closed
Release:  None Programmer 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

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-07-01 joerg_wunsch StatusNone Fixed
        Assigned toNone joerg_wunsch
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-aa77.
    Corresponding source code