!GEN is now 1 by default.
authortravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Mon, 15 Feb 2010 02:38:15 +0000 (02:38 +0000)
committertravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Mon, 15 Feb 2010 02:38:15 +0000 (02:38 +0000)
git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@319 12e2690d-a6be-4b82-a7b7-67c4a43b65c8

firmware/apps/avr/avr.c
firmware/apps/glitch/glitch.c
firmware/goodfet.c

index b052272..53d9f30 100644 (file)
@@ -11,7 +11,7 @@
 #include <iomacros.h>
 
 #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();
index b5cd5bc..95653ff 100644 (file)
@@ -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;
 }
 
 
index 69436a1..355ae00 100644 (file)
@@ -49,7 +49,7 @@ void init(){
       doesn't clear P5OUT or P5DIR.\r
   */\r
   P5DIR|=BIT7; P5OUT=BIT7; //Normal Supply\r
-  P5DIR&=~BIT7; //Glitch Supply\r
+  //P5DIR&=~BIT7; //Glitch Supply\r
   \r
   //Enable Interrupts.\r
   //eint();\r