From a5bef2ec7a9a91b7edc3698e7cbc36439994184a Mon Sep 17 00:00:00 2001 From: travisutk Date: Mon, 1 Mar 2010 04:04:59 +0000 Subject: [PATCH] More glitching changes. git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@380 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- firmware/apps/chipcon/chipconasm.S | 24 ++++++++++++++++++++++++ firmware/apps/glitch/glitch.c | 12 +++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/firmware/apps/chipcon/chipconasm.S b/firmware/apps/chipcon/chipconasm.S index 09e8683..38a4a2b 100644 --- a/firmware/apps/chipcon/chipconasm.S +++ b/firmware/apps/chipcon/chipconasm.S @@ -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 bis.b #13, &0x0031 ;5 cycles bic.b #8, &0x0031 ;4 cycles diff --git a/firmware/apps/glitch/glitch.c b/firmware/apps/glitch/glitch.c index 53b0376..1962190 100644 --- a/firmware/apps/glitch/glitch.c +++ b/firmware/apps/glitch/glitch.c @@ -30,6 +30,7 @@ void glitchsetup(){ //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. @@ -46,9 +47,18 @@ void glitchsetup(){ // 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 - //P5DIR=BIT7; //All else high impedance. + //asm("nop"); //delay deepens glitch. P5OUT^=BIT7;//Normal + + //This oughtn't be necessary, but glitches repeat without it. + //TACTL=0; //disable counter. + + //P5OUT^=BIT7;//Normal return; } -- 2.20.1