Reliability patch to Chipcon.
[goodfet] / firmware / apps / chipcon / chipcon.c
index c226361..28440c4 100644 (file)
@@ -125,6 +125,9 @@ void ccread(unsigned char len){
 void cchandle(unsigned char app,
               unsigned char verb,
               unsigned long len){
+  //Always init.  Might help with buggy lines.
+  ccdebuginit();
+  
   switch(verb){
     //CC_PEEK and CC_POKE will come later.
   case READ:  //Write a command and return 1-byte reply.
@@ -332,6 +335,10 @@ unsigned char cc_debug(unsigned char len,
   unsigned char cmd=0x54+(len&0x3);//(len&0x3);
   CCWRITE;
   cctrans8(0xFF);//resync
+  cctrans8(0xFF);//resync
+  cctrans8(0xFF);//resync
+  cctrans8(0xFF);//resync
+  cctrans8(0xFF);//resync
   cctrans8(cmd);
   if(len--)
     cctrans8(a);