-//GoodFET ChipCon Debugging Application
-//Handles basic I/O for the Chipcon 8051 debugging protocol.
+/*! \file chipcon.c
+ \author Travis Goodspeed
+
+ This is an implementation of the Chipcon 8051
+ debugging protocol for the GoodFET.
+*/
-//Higher level left to client application.
//This is like SPI, except that you read or write, not both.
-/** N.B. The READ verb performs a write of all (any) supplied data,
+/* N.B. The READ verb performs a write of all (any) supplied data,
then reads a single byte reply from the target. The WRITE verb
only writes.
*/
-//This is REALLY untested.
-
#include "platform.h"
#include "command.h"
#include "chipcon.h"
#include <iomacros.h>
-/** Concerning clock rates,
+/* Concerning clock rates,
the maximimum clock rates are defined on page 4 of the spec.
They vary, but are roughly 30MHz. Raising this clock rate might
allow for clock glitching, but the GoodFET isn't sufficient fast for that.
txdata(app,verb,1);
break;
case CC_SET_PC:
-
case CC_CLOCK_INIT:
case CC_WRITE_FLASH_PAGE:
case CC_MASS_ERASE_FLASH:
//CLR A
cc_debug(2, 0xE4, 0, 0);
//MOVC A, @A+DPTR;
- toret=cc_debug(1, 0x93, 0, 0);
+ toret=cc_debug(3, 0x93, 0, 0);
//INC DPTR
//cc_debug(1, 0xA3, 0, 0);