X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=firmware%2Fapps%2Fchipcon%2Fchipcon.c;h=c2c2a27b1a3544b1aea21dde656f3b387cf37297;hp=c45effc88eea1156efa4a71d44b37fe12ed9719c;hb=a456d2fbf645904f642f714fa86766f195384d94;hpb=c120e1b191dde4924b146e94c8e96729204518de diff --git a/firmware/apps/chipcon/chipcon.c b/firmware/apps/chipcon/chipcon.c index c45effc..c2c2a27 100644 --- a/firmware/apps/chipcon/chipcon.c +++ b/firmware/apps/chipcon/chipcon.c @@ -53,10 +53,15 @@ void ccsetup(){ P5OUT|=MOSI+SCK+RST; P5DIR|=MOSI+SCK+RST; //P5DIR&=~MISO; //MOSI is MISO + + //P5REN=0xFF; + } //! Initialize the debugger void ccdebuginit(){ + 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. P5OUT&=~SCK; @@ -283,7 +288,7 @@ void cc_wr_config(unsigned char config){ void cc_lockchip(){ register int i; - debugstr("Locking chip."); + //debugstr("Locking chip."); cc_wr_config(1);//Select Info Flash if(!(cc_rd_config()&1)) debugstr("Config forgotten!"); @@ -319,7 +324,6 @@ unsigned char cc_read_status(){ //! Read the CHIP ID bytes. unsigned short cc_get_chip_id(){ - unsigned short toret; cmddata[0]=CCCMD_GET_CHIP_ID; //0x68 cccmd(1); ccread(2);