From b3ba69f3eda0d07d7f2fc0922556a011c95d7951 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 12 Aug 2011 04:41:19 -0700 Subject: altos-avr: Completely replace the spi slave code Turns out the AVR we're using sucks at doing SPI slave. To get it running at a reasonable data rate, I had to completely gut the 'sensible' code and run everything from the ISR with interrupts disabled. Even with this, the maximum SPI clock rate is somewhere around 200kHz. That's due to the singled buffered nature of the transmit queue, the amount of time available between finishing one byte and starting the next is very very small. Signed-off-by: Keith Packard --- src-avr/telescience/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src-avr/telescience') diff --git a/src-avr/telescience/Makefile b/src-avr/telescience/Makefile index b50559a9..9b04fa6e 100644 --- a/src-avr/telescience/Makefile +++ b/src-avr/telescience/Makefile @@ -18,7 +18,7 @@ DUDECPUTYPE=m32u4 PROGRAMMER=usbtiny LOADCMD=avrdude LOADARG=-p $(DUDECPUTYPE) -c $(PROGRAMMER) -e -U flash:w: -CC=avr-gcc -v +CC=avr-gcc OBJCOPY=avr-objcopy ifndef VERSION @@ -59,7 +59,7 @@ PRODUCT=TeleScience-v0.1 MCU=atmega32u4 PRODUCT_DEF=-DTELESCIENCE IDPRODUCT=0x000a -CFLAGS += -g -mmcu=$(MCU) -Wall -Wstrict-prototypes -Os -mcall-prologues $(PRODUCT_DEF) -I. -DAVR +CFLAGS += -g -mmcu=$(MCU) -Wall -Wstrict-prototypes -O3 -mcall-prologues $(PRODUCT_DEF) -I. -DAVR NICKLE=nickle -- cgit v1.2.3