From f0eaf8347f79d77ca7d1bcaf8018d3e3b1505649 Mon Sep 17 00:00:00 2001 From: travisutk Date: Mon, 15 Feb 2010 02:38:15 +0000 Subject: [PATCH] !GEN is now 1 by default. git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@319 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- firmware/apps/avr/avr.c | 11 +++++++---- firmware/apps/glitch/glitch.c | 8 ++++---- firmware/goodfet.c | 2 +- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/firmware/apps/avr/avr.c b/firmware/apps/avr/avr.c index b052272..53d9f30 100644 --- a/firmware/apps/avr/avr.c +++ b/firmware/apps/avr/avr.c @@ -11,7 +11,7 @@ #include #include "avr.h" -#include "glitch.h" +//#include "glitch.h" //! Setup the AVR pins. void avrsetup(){ @@ -22,17 +22,20 @@ void avrsetup(){ void avrconnect(){ //set I/O pins avrsetup(); //Cut this? - //delay(50); + + SETSS; + delay(50); //Pulse !RST (SS) at least twice while CLK is low. CLRCLK; CLRSS; + delay(5); SETSS; CLRCLK; - //delay(5); + delay(5); CLRSS; - //delay(5); + delay(5); //Enable programming avr_prgen(); diff --git a/firmware/apps/glitch/glitch.c b/firmware/apps/glitch/glitch.c index b5cd5bc..95653ff 100644 --- a/firmware/apps/glitch/glitch.c +++ b/firmware/apps/glitch/glitch.c @@ -16,7 +16,7 @@ void glitchprime(){ #ifdef DAC12IR //Don't forget to call glitchvoltages(). - + P5OUT|=0x80; //Reconfigure TACTL. TACTL=0; //Clear dividers. TACTL|=TACLR; //Clear TimerA Config @@ -28,7 +28,7 @@ void glitchprime(){ CCR0 = glitchcount; //Enable general interrupts, just in case. - _EINT(); + //_EINT(); #endif } @@ -48,6 +48,7 @@ void glitchsetup(){ CCTL0 = CCIE; // CCR0 interrupt enabled CCR0 = glitchcount; TACTL |= MC1; // Start Timer_A in continuous mode + //TACTL |= MC0; // Stop Timer_A; _EINT(); // Enable interrupts #endif } @@ -55,11 +56,10 @@ void glitchsetup(){ // Timer A0 interrupt service routine interrupt(TIMERA0_VECTOR) Timer_A (void) { -#ifdef DAC12IR P5OUT&=~BIT7;//Glitch P5OUT|=BIT7;//Normal -#endif TACTL |= MC0; // Stop Timer_A; + return; } diff --git a/firmware/goodfet.c b/firmware/goodfet.c index 69436a1..355ae00 100644 --- a/firmware/goodfet.c +++ b/firmware/goodfet.c @@ -49,7 +49,7 @@ void init(){ doesn't clear P5OUT or P5DIR. */ P5DIR|=BIT7; P5OUT=BIT7; //Normal Supply - P5DIR&=~BIT7; //Glitch Supply + //P5DIR&=~BIT7; //Glitch Supply //Enable Interrupts. //eint(); -- 2.20.1