projects
/
goodfet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Closer to reliable AVR glitching.
[goodfet]
/
firmware
/
apps
/
chipcon
/
chipcon.c
diff --git
a/firmware/apps/chipcon/chipcon.c
b/firmware/apps/chipcon/chipcon.c
index
8ee6e80
..
92542fc
100644
(file)
--- a/
firmware/apps/chipcon/chipcon.c
+++ b/
firmware/apps/chipcon/chipcon.c
@@
-142,14
+142,17
@@
void cchandle(unsigned char app,
break;
case READ: //Write a command and return 1-byte reply.
cccmd(len);
break;
case READ: //Write a command and return 1-byte reply.
cccmd(len);
- ccread(1);
+ if(cmddata[0]&0x4)
+ ccread(1);
txdata(app,verb,1);
txdata(app,verb,1);
+
break;
case WRITE: //Write a command with no reply.
cccmd(len);
txdata(app,verb,0);
break;
case START://enter debugger
break;
case WRITE: //Write a command with no reply.
cccmd(len);
txdata(app,verb,0);
break;
case START://enter debugger
+ ccsetup();
ccdebuginit();
txdata(app,verb,0);
break;
ccdebuginit();
txdata(app,verb,0);
break;
@@
-278,7
+281,7
@@
void cc_wr_config(unsigned char config){
//! Locks the chip.
void cc_lockchip(){
//! Locks the chip.
void cc_lockchip(){
- register i;
+ register i
nt i
;
debugstr("Locking chip.");
cc_wr_config(1);//Select Info Flash
debugstr("Locking chip.");
cc_wr_config(1);//Select Info Flash
@@
-555,8
+558,7
@@
for (n = 0; n < count; n++) {
unsigned char cc_peekdatabyte(unsigned int adr){
unsigned char
hb=(adr&0xFF00)>>8,
unsigned char cc_peekdatabyte(unsigned int adr){
unsigned char
hb=(adr&0xFF00)>>8,
- lb=adr&0xFF,
- toret;
+ lb=adr&0xFF;
//MOV DPTR, adr
cc_debug(3, 0x90, hb, lb);
//MOV DPTR, adr
cc_debug(3, 0x90, hb, lb);