change fuses , always watchdog and 2048 words bootloader section
This commit is contained in:
parent
9e1a9fffc5
commit
e45b08a5fb
@ -2,8 +2,7 @@
|
|||||||
TTY = /dev/tty.PL2303-00002126
|
TTY = /dev/tty.PL2303-00002126
|
||||||
DEVICE = atmega644
|
DEVICE = atmega644
|
||||||
F_CPU = 20000000 # in Hz
|
F_CPU = 20000000 # in Hz
|
||||||
FUSE_L = 0xf7
|
|
||||||
FUSE_H = 0xdd
|
|
||||||
AVRDUDE = avrdude -c usbasp -p $(DEVICE)
|
AVRDUDE = avrdude -c usbasp -p $(DEVICE)
|
||||||
|
|
||||||
CFLAGS = -Iusbdrv -I. -DDEBUG_LEVEL=0
|
CFLAGS = -Iusbdrv -I. -DDEBUG_LEVEL=0
|
||||||
@ -16,12 +15,8 @@ COMPILE = avr-gcc -Wall -Os -DF_CPU=$(F_CPU) $(CFLAGS) -mmcu=$(DEVICE)
|
|||||||
# Fuse values for particular devices
|
# Fuse values for particular devices
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# http://www.engbedded.com/fusecalc/
|
# http://www.engbedded.com/fusecalc/
|
||||||
################################## ATMega644 ##################################
|
FUSE_L = 0xf7
|
||||||
# ATMega644 FUSE_L (Fuse low byte):
|
FUSE_H = 0xda
|
||||||
# 0xf7 = 1 1 1 1 0 1 1 1
|
|
||||||
# ATMega644 FUSE_H (Fuse high byte):
|
|
||||||
# 0xdd = 1 1 0 1 1 1 0 0
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# symbolic targets:
|
# symbolic targets:
|
||||||
|
|||||||
@ -408,21 +408,38 @@ int main(void)
|
|||||||
#if 0
|
#if 0
|
||||||
i = 20;
|
i = 20;
|
||||||
while (--i) { /* fake USB disconnect for > 250 ms */
|
while (--i) { /* fake USB disconnect for > 250 ms */
|
||||||
_delay_ms(100);
|
_delay_ms(500);
|
||||||
|
printf("Wait to switch to avr mode %i\n", i);
|
||||||
}
|
}
|
||||||
printf("Send IRQ\n");
|
printf("Send IRQ\n");
|
||||||
snes_irq_lo();
|
//snes_irq_lo();
|
||||||
snes_irq_on();
|
//snes_irq_on();
|
||||||
_delay_ms(1);
|
//_delay_ms(1);
|
||||||
|
|
||||||
//avr_bus_active();
|
avr_bus_active();
|
||||||
//c = sram_bulk_read();
|
|
||||||
//snes_bus_active();
|
|
||||||
|
|
||||||
snes_irq_off();
|
sram_bulk_read_start(0x003000);
|
||||||
|
c = sram_bulk_read();
|
||||||
|
i = 5;
|
||||||
|
while (--i) { /* fake USB disconnect for > 250 ms */
|
||||||
|
_delay_ms(500);
|
||||||
|
printf("Wait to switch to snes mode %i\n", i);
|
||||||
|
}
|
||||||
|
|
||||||
//sram_bulk_read_start(0x003000);
|
if (req_bank_size == 0x8000){
|
||||||
//printf("Read 0x3000=%c\n",c);
|
snes_lorom();
|
||||||
|
printf("Set Snes lowrom \n");
|
||||||
|
} else {
|
||||||
|
snes_hirom();
|
||||||
|
printf("Set Snes hirom \n");
|
||||||
|
}
|
||||||
|
snes_wr_disable();
|
||||||
|
printf("Disable snes WR\n");
|
||||||
|
|
||||||
|
snes_bus_active();
|
||||||
|
printf("Activate Snes bus\n");
|
||||||
|
|
||||||
|
printf("Read 0x3000=%c\n",c);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user