diff --git a/avr/usbload/Makefile b/avr/usbload/Makefile index 9ea3c36..fe26c9d 100644 --- a/avr/usbload/Makefile +++ b/avr/usbload/Makefile @@ -3,11 +3,11 @@ TTY = /dev/tty.PL2303-00002126 DEVICE = atmega644 F_CPU = 20000000 # in Hz FUSE_L = 0xf7 -FUSE_H = 0xd9 +FUSE_H = 0xdd AVRDUDE = avrdude -c usbasp -p $(DEVICE) CFLAGS = -Iusbdrv -I. -DDEBUG_LEVEL=0 -#-std=gnu99 + OBJECTS = usbdrv/usbdrv.o usbdrv/usbdrvasm.o usbdrv/oddebug.o main.o usb_bulk.o uart.o fifo.o sram.o crc.o debug.o dump.o timer.o watchdog.o COMPILE = avr-gcc -Wall -Os -DF_CPU=$(F_CPU) $(CFLAGS) -mmcu=$(DEVICE) @@ -15,27 +15,12 @@ COMPILE = avr-gcc -Wall -Os -DF_CPU=$(F_CPU) $(CFLAGS) -mmcu=$(DEVICE) ############################################################################## # Fuse values for particular devices ############################################################################## -# If your device is not listed here, go to -# http://palmavr.sourceforge.net/cgi-bin/fc.cgi -# and choose options for external crystal clock and no clock divider -# +# http://www.engbedded.com/fusecalc/ ################################## ATMega644 ################################## # ATMega644 FUSE_L (Fuse low byte): # 0xf7 = 1 1 1 1 0 1 1 1 -# ^ ^ \ / \--+--/ -# | | | +------- CKSEL 3..0 (external >8M crystal) -# | | +--------------- SUT 1..0 (crystal osc, BOD enabled) -# | +------------------ BODEN (BrownOut Detector enabled) -# +-------------------- BODLEVEL (2.7V) - # ATMega644 FUSE_H (Fuse high byte): -# 0xd9 = 1 1 0 1 1 0 0 1 -# ^ ^ ^ ^ ^ ^ ^------ BOOTSZ0 -# | | | | | +-------- BOOTSZ1 -# | | | | + --------- EESAVE (don't preserve EEPROM over chip erase) -# | | | +-------------- CKOPT (full output swing) -# | | +---------------- SPIEN (allow serial programming) -# | +------------------ WDTON (WDT not always on) +# 0xdd = 1 1 0 1 1 1 0 0 diff --git a/avr/usbload/main.c b/avr/usbload/main.c index e70dc6e..9fc5ea1 100644 --- a/avr/usbload/main.c +++ b/avr/usbload/main.c @@ -413,15 +413,16 @@ int main(void) printf("Send IRQ\n"); snes_irq_lo(); snes_irq_on(); + _delay_ms(1); - avr_bus_active(); - c = sram_bulk_read(); - snes_bus_active(); + //avr_bus_active(); + //c = sram_bulk_read(); + //snes_bus_active(); snes_irq_off(); - sram_bulk_read_start(0x003000); - printf("Read 0x3000=%c\n",c); + //sram_bulk_read_start(0x003000); + //printf("Read 0x3000=%c\n",c); #endif } }