From f515b7a8aae68363cba997f8581001401e70054b Mon Sep 17 00:00:00 2001 From: travisutk Date: Sun, 28 Feb 2010 20:03:30 +0000 Subject: [PATCH] Major glitching fix. git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@373 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- firmware/apps/chipcon/chipcon.c | 3 +-- firmware/apps/glitch/glitch.c | 7 ++++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/firmware/apps/chipcon/chipcon.c b/firmware/apps/chipcon/chipcon.c index 8d4abca..1f4b3d4 100644 --- a/firmware/apps/chipcon/chipcon.c +++ b/firmware/apps/chipcon/chipcon.c @@ -61,7 +61,7 @@ void ccdebuginit(){ //Port output BUT NOT DIRECTION is set at start. P5OUT|=MOSI+SCK+RST; - delay(30); //So the beginning is ready for glitching. + //delay(30); //So the beginning is ready for glitching. //Two positive debug clock pulses while !RST is low. //Take RST low, pulse twice, then high. @@ -154,7 +154,6 @@ void cchandle(unsigned char app, txdata(app,verb,0); break; case START://enter debugger - //ccsetup(); //interferes with glitching ccdebuginit(); txdata(app,verb,0); break; diff --git a/firmware/apps/glitch/glitch.c b/firmware/apps/glitch/glitch.c index 6e63b91..4c4c6cf 100644 --- a/firmware/apps/glitch/glitch.c +++ b/firmware/apps/glitch/glitch.c @@ -39,8 +39,8 @@ void glitchsetup(){ WDTCTL = WDTPW + WDTHOLD; // Stop WDT TACTL = TASSEL1 + TACLR; // SMCLK, clear TAR CCTL0 = CCIE; // CCR0 interrupt enabled - CCR0 = glitchcount+0x15; //clock divider - TACTL |= MC_3; + CCR0 = glitchcount+0x15; // Compare Value + TACTL |= MC_2; // continuous mode. #endif } @@ -116,7 +116,7 @@ void glitchhandle(unsigned char app, TACTL=0; //clear dividers TACTL|=TACLR; //clear config TACTL|=TASSEL_SMCLK| //smclk source - MC_2; //continuout mode. + MC_2; //continuous mode. //perform the function silent++;//Don't want the function to return anything. @@ -126,6 +126,7 @@ void glitchhandle(unsigned char app, txdata(app,verb,2); break; case START: + //Testing mode, for looking at the glitch waveform. glitchvoltages(0xFFF,0);//Inverted VCC and GND. P5OUT|=BIT7;//Normal P5DIR|=BIT7; -- 2.20.1