More glitching changes.
authortravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Mon, 1 Mar 2010 04:04:59 +0000 (04:04 +0000)
committertravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Mon, 1 Mar 2010 04:04:59 +0000 (04:04 +0000)
git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@380 12e2690d-a6be-4b82-a7b7-67c4a43b65c8

firmware/apps/chipcon/chipconasm.S
firmware/apps/glitch/glitch.c

index 09e8683..38a4a2b 100644 (file)
@@ -20,6 +20,30 @@ ccdebuginit:
        nop                     ;1 cycle
        nop                     ;1 cycle
        nop                     ;1 cycle
        nop                     ;1 cycle
        nop                     ;1 cycle
        nop                     ;1 cycle
+       nop                     ;1 cycle
+       nop                     ;1 cycle
+       nop                     ;1 cycle
+       nop                     ;1 cycle
+       nop                     ;1 cycle
+       nop                     ;1 cycle
+       nop                     ;1 cycle
+       nop                     ;1 cycle
+       nop                     ;1 cycle
+       nop                     ;1 cycle
+       nop                     ;1 cycle
+       nop                     ;1 cycle
+       nop                     ;1 cycle
+       nop                     ;1 cycle
+       nop                     ;1 cycle
+       nop                     ;1 cycle
+       nop                     ;1 cycle
+       nop                     ;1 cycle
+       nop                     ;1 cycle
+       nop                     ;1 cycle
+       nop                     ;1 cycle
+       nop                     ;1 cycle
+       nop                     ;1 cycle
+       nop                     ;1 cycle
        
        bis.b   #13,    &0x0031 ;5 cycles
        bic.b   #8,     &0x0031 ;4 cycles
        
        bis.b   #13,    &0x0031 ;5 cycles
        bic.b   #8,     &0x0031 ;4 cycles
index 53b0376..1962190 100644 (file)
@@ -30,6 +30,7 @@ void glitchsetup(){
   
   //Normal voltage, use resistors instead of output.
   //P5DIR=0x80;   //ONLY glitch pin is output.
   
   //Normal voltage, use resistors instead of output.
   //P5DIR=0x80;   //ONLY glitch pin is output.
+  P5DIR|=0x80;   //glitch pin is output.
   P5OUT|=0x80;  //It MUST begin high.
   //P5REN|=0x7F;  //Resistors pull high and low weakly.
   
   P5OUT|=0x80;  //It MUST begin high.
   //P5REN|=0x7F;  //Resistors pull high and low weakly.
   
@@ -46,9 +47,18 @@ void glitchsetup(){
 
 // Timer A0 interrupt service routine
 interrupt(TIMERA0_VECTOR) Timer_A (void){
 
 // Timer A0 interrupt service routine
 interrupt(TIMERA0_VECTOR) Timer_A (void){
+  //This oughtn't be necessary, but glitches repeat without it.
+  TACTL=0; //disable counter.
+  
+  
   P5OUT^=BIT7;//Glitch
   P5OUT^=BIT7;//Glitch
-  //P5DIR=BIT7; //All else high impedance.
+  //asm("nop"); //delay deepens glitch.
   P5OUT^=BIT7;//Normal
   P5OUT^=BIT7;//Normal
+  
+  //This oughtn't be necessary, but glitches repeat without it.
+  //TACTL=0; //disable counter.
+  
+  //P5OUT^=BIT7;//Normal
   return;
 }
 
   return;
 }