From cb0b62cea38146c2414ccf215626daa8acf9aca5 Mon Sep 17 00:00:00 2001 From: travisutk Date: Fri, 16 Mar 2012 23:17:59 +0000 Subject: [PATCH] Reintegrating glitching code. git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@1104 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- firmware/apps/glitch/glitch.c | 11 +++++++---- firmware/config.mk | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/firmware/apps/glitch/glitch.c b/firmware/apps/glitch/glitch.c index 40e8122..83fa9d6 100644 --- a/firmware/apps/glitch/glitch.c +++ b/firmware/apps/glitch/glitch.c @@ -11,6 +11,8 @@ #include "command.h" #include "glitch.h" +#include + //! Handles a monitor command. void glitch_handle_fn( uint8_t const app, uint8_t const verb, @@ -41,7 +43,8 @@ void glitchprime(){ WDTCTL = WDTPW + WDTHOLD; // Stop WDT glitchsetup(); - _EINT(); + //_EINT(); + __eint(); return; #endif } @@ -69,7 +72,7 @@ void glitchsetup(){ } // Timer A0 interrupt service routine -interrupt(TIMERA0_VECTOR) Timer_A (void){ +void __attribute__((interrupt(TIMERA0_VECTOR))) Timer_A (void){ //This oughtn't be necessary, but glitches repeat without it. TACTL=0; //disable counter. @@ -148,11 +151,11 @@ void glitch_handle_fn( uint8_t const app, break; case GLITCHTIME: debugstr("Measuring start time."); - _DINT();//disable interrupts + __dint();//disable interrupts TACTL=0; //clear dividers TACTL|=TACLR; //clear config TACTL|= - TASSEL_SMCLK //smclk source + TASSEL_2 //smclk source | MC_2; //continuous mode. //perform the function diff --git a/firmware/config.mk b/firmware/config.mk index 4bb7af5..a9f6289 100644 --- a/firmware/config.mk +++ b/firmware/config.mk @@ -28,6 +28,7 @@ endif ifneq (,$(findstring $(board),goodfet24)) mcu ?= msp430f2618 platform := goodfet +CONFIG_glitch = y endif ifneq (,$(findstring $(board),nhb12b)) -- 2.20.1