Updating fuses. Had issues when erasing/programming NES boards

JTAG being enabled (default setting) caused problems.
Switched back to disabled as it's not intended to be used anyway.
This commit is contained in:
paul eeepc 2016-11-18 21:32:21 -06:00
parent ffe4634210
commit c4bbfbcd60
1 changed files with 14 additions and 9 deletions

View File

@ -21,12 +21,13 @@ DEVICE = atmega164a
#BOOTLOADER_ADDRESS = datasheet: 0x1C00 * 2words/address = 0x3800 #BOOTLOADER_ADDRESS = datasheet: 0x1C00 * 2words/address = 0x3800
BOOTLOADER_ADDRESS = 3800 BOOTLOADER_ADDRESS = 3800
F_CPU = 16000000 F_CPU = 16000000
LOCK = 0xEF
EFUSE = 0xFD ###############################################################################
FUSEH = 0x98 # ATMEGA-164A FUSE TABLE
FUSEL = 0xDF # see datasheet for further explaination of each fuse
###############################################################################
# #
# Lock bit byte: 0xEF # Lock bit byte:
# Default: all set 0xFF # Default: all set 0xFF
# +------------------- unused/reserved (def prgm = 1) # +------------------- unused/reserved (def prgm = 1)
# | +---------------- BLB12 read BL section 1=allowed # | +---------------- BLB12 read BL section 1=allowed
@ -35,27 +36,30 @@ FUSEL = 0xDF
# | | | | +-------- BLB01 write app section 1=not allowed # | | | | +-------- BLB01 write app section 1=not allowed
# / \ v v v v /-v---- LB[2:1] lock chip 11=unlocked # / \ v v v v /-v---- LB[2:1] lock chip 11=unlocked
# 0xEF = 1 1 1 0 1 1 1 1 # 0xEF = 1 1 1 0 1 1 1 1
LOCK = 0xEF
# #
# #
# Extended fuse byte: 0xFD # Extended fuse byte:
# Default: all set 0xFF # Default: all set 0xFF
# +--------------- unused/reserved (def prgm = 1) # +--------------- unused/reserved (def prgm = 1)
# | +------ BODLEVEL[2:0] # | +------ BODLEVEL[2:0]
# /----+----\ /-+-\ 111=BOD disbl 110=BOD 1.8V # /----+----\ /-+-\ 111=BOD disbl 110=BOD 1.8V
# 0xFD = 1 1 1 1 1 1 0 1 101=BOD 2.7V 100=BOD 4.3V # 0xFD = 1 1 1 1 1 1 0 1 101=BOD 2.7V 100=BOD 4.3V
EFUSE = 0xFD
# #
# #
# Fuse high byte: 0x98 # Fuse high byte:
# Default: 0x99 # Default: 0x99
# +-------------------- OCDEN 1=On-Chip-Debugger disabled # +-------------------- OCDEN 1=On-Chip-Debugger disabled
# | +------------------ JTAGEN 0=JTAG enabled # | +------------------ JTAGEN 1=JTAG disabled (enabled caused problems!)
# | | +---------------- SPIEN 0=SPI prgm/dwnld enabled # | | +---------------- SPIEN 0=SPI prgm/dwnld enabled
# | | | +-------------- WDTON 1=WDT not always on # | | | +-------------- WDTON 1=WDT not always on
# | | | | # | | | |
# | | | | +---------- EESAVE 1=eeprom not preserved w/chip erase # | | | | +---------- EESAVE 1=eeprom not preserved w/chip erase
# | | | | | +------- BOOTSZ[1:0] bootloader size # | | | | | +------- BOOTSZ[1:0] bootloader size
# v v v v v / \ 00=1Kwords App end= 0x1BFF BL start=0x1C00 # v v v v v / \ 00=1Kwords App end= 0x1BFF BL start=0x1C00
# 0x98 = 1 0 0 1 1 0 0 0 <-- BOOTRST 0=reset vector-> BL section # 0xD8 = 1 1 0 1 1 0 0 0 <-- BOOTRST 0=reset vector-> BL section
FUSEH = 0xD8
# #
# #
# Fuse low byte: 0xDF # Fuse low byte: 0xDF
@ -66,6 +70,7 @@ FUSEL = 0xDF
# | | | +------- CKSEL[3:0] 1111=low pwr xtal 8-16Mhz # | | | +------- CKSEL[3:0] 1111=low pwr xtal 8-16Mhz
# v v / \ /--^--\ [3:1] 111=low power 8-16Mhz # v v / \ /--^--\ [3:1] 111=low power 8-16Mhz
# 0xDF = 1 1 0 1 1 1 1 1 [0] 1= xtal # 0xDF = 1 1 0 1 1 1 1 1 [0] 1= xtal
FUSEL = 0xDF
# #
############################################################################### ###############################################################################