Home \ Help \ Search \ Login RSS

Welcome, Guest. Please Login

This forum is now READ-ONLY! Please visit http://forum.wiring.co/ for the new forum.

Wiring ForumWiring HardwareTroubleshooting › ATmega128 Fuses

Page Index Toggle Pages: 1
ATmega128 Fuses (Read 9492 times)
12/30/08 at 08:27:43

letaage   Offline
YaBB Newbies

Posts: 3
*
 
Hi all,

I have built a barebones Wiring compatible board to experiment with.  It consists of:

- ATmega128 CPU
- 16MHz xtal
- 32.768KHz watch xtal
- LED on PG0
- ISP Header (using 10 pin ATMEL ISP variant) to PE0, PE1, PB1, /RESET
- Reset Switch and 10k pull up
- +5V supply
- FTDI Serial/USB cable TTL-232R

ie it's all as per the wiring schematic (the Serial/USB cable replaces the FT232BM).

I have programmed the wiring boot loader into the device using AVR Studio v4.15, I have an original ATMEL STK500 serial ISP programmer.

AVR Studio can talk to the device and read the signature back (and program the flash), but I'm having a hard time working out what the exact fuse settings should be.  I've already fritzed one CPU in the process, and for some reason I was unable to get it working again using an external clock directly to pin 24 (XTAL1).

The default fuses of the unprogrammed ATmega128 are (X = "selected", O = "not selected" in AVR Studio):

M103C       X
WDTON      O
OCDEN       O
JTAGEN      X
SPIEN        X
EESAVE      O
BOOTSZ     Boot Flash size = 4096 words start address = $F000
BOOTRST   O
CKOPT       O
BODLEVEL  Brown-out detection level at VCC=2.7 V
BODEN       O
SUT_CKSEL   Int. RC OSc 1MHz; Start-up time: 6 CK + 64 ms

Giving:
EXTENDED = 0xFD
HIGH        = 0x99
LOW         = 0xE1

Now from what I've read on this forum I think I need to set the fuses as follows:

M103C       O
WDTON      O
OCDEN       O
JTAGEN      X
SPIEN        X
EESAVE      O
BOOTSZ     Boot Flash size = 1024 words start address = $FC00
BOOTRST   X
CKOPT       X
BODLEVEL  Brown-out detection level at VCC=4.0 V
BODEN       X
SUT_CKSEL   Ext. Crystal/Resonator High Freq; Start-up time: 16K CK + 64 ms

Giving:
EXTENDED = 0xFF
HIGH        = 0x8C
LOW         = 0x3F

I don't want to disable the JTAG interface since I have read that it can be used to fix a CPU with bad fuse settings (been caught by that once already!)

Can anyone confirm that these settings should work and not cause me to lose another CPU???

Thanks,
Tom
« Last Edit: 12/30/08 at 13:40:49 by letaage »  
IP Logged
 
Reply #1 - 12/30/08 at 23:04:33

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
those are correct. That´s odd about losing a cpu, it never happened here, we don´t enable the JTAG.
h.
 
IP Logged
 
Reply #2 - 12/31/08 at 01:56:49

letaage   Offline
YaBB Newbies

Posts: 3
*
 
Thanks for that, it worked this time, the clock started running.

I'm not sure what caused the problem last time, but I think that I had other hardware issues on my lashed together set up.

Now to test the bootloader with the wiring environment....
 
IP Logged
 
Page Index Toggle Pages: 1