X-Git-Url: http://git.rot13.org//?p=goodfet;a=blobdiff_plain;f=firmware%2Fapps%2Fglitch%2Fglitch.c;fp=firmware%2Fapps%2Fglitch%2Fglitch.c;h=4c4c6cf63d30416e26eb1d09b7a29f148b12453b;hp=6e63b91a22f902006b8c86ba1db324f4bfb991f8;hb=f515b7a8aae68363cba997f8581001401e70054b;hpb=08977d594b3508577ba8709fa2b50151b2cdd7f5 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;