You must define fuse0 in avrdude config file. \\wbr Vitaly Chernookiy
On Tue, May 19, 2009 at 5:39 PM, anonymous <[email protected]> wrote: > > URL: > <http://savannah.nongnu.org/bugs/?26620> > > Summary: Cannot write to fuse bits[0,1,2,4,5] > Project: AVR Downloader/UploaDEr > Submitted by: None > Submitted on: Tue 19 May 2009 14:39:05 UTC > Category: None > Severity: 3 - Normal > Priority: 5 - Normal > Item Group: None > Status: None > Privacy: Public > Assigned to: None > Originator Name: Martin Edney > Originator Email: [email protected] > Open/Closed: Open > Discussion Lock: Any > > _______________________________________________________ > > Details: > > 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? > > > > > _______________________________________________________ > > Reply to this item at: > > <http://savannah.nongnu.org/bugs/?26620> > > _______________________________________________ > Message sent via/by Savannah > http://savannah.nongnu.org/ > > > > _______________________________________________ > avrdude-dev mailing list > [email protected] > http://lists.nongnu.org/mailman/listinfo/avrdude-dev > _______________________________________________ avrdude-dev mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/avrdude-dev
