Chipcon Application
This application allows for the debugging of Chipcon radios with embedded 8051 cores, such as the CC2430 and CC2530. The protocol is SPI-like, but with a bi-directional data line.
Clients
chipcon.cc is an actively maintained client application.
Development
Prior to any transactions, the SETUP (0x10) verb should be sent to the Chipcon application to properly set the I/O pin directions. After that, the START (0x20) and STOP (0x21) verbs may be used to enter and exit the debugger.
The Chipcon protocol is similar to SPI, but with the difference that a single data line is used. Rather than exchanging register values, the transfer is one-way. Use the WRITE (0x01) instruction only for debugging commands which do not result in a reply. READ (0x00) will write its data to the target, then accept a return byte in reply.
Verbs
While standard verbs are supported on this platform, they are inadequate for full debugging. Verbs 0x80 to 0x8F are debugging primitives, while verbs 0x90 to 0x9F are used for more complicated macro commands.
Hex | #define | Description |
---|---|---|
0x00 | READ | Write any data, return 1-byte reply. |
0x01 | WRITE | Write data. |
0x02 | PEEK | Read from IRAM. |
0x03 | POKE | Write to IRAM. |
0x10 | SETUP | Configure I/O pins. |
0x20 | START | Start a transaction. |
0x21 | STOP | Stop a transaction. |
0x80 | CC_CHIP_ERASE | |
0x81 | CC_WR_CONFIG | |
0x82 | CC_RD_CONFIG | |
0x83 | CC_GET_PC | |
0x84 | CC_READ_STATUS | |
0x85 | CC_SET_HW_BRKPNT | |
0x86 | CC_HALT | |
0x87 | CC_RESUME | |
0x88 | CC_DEBUG_INSTR | |
0x89 | CC_STEP_INSTR | |
0x8A | CC_STEP_REPLACE | |
0x8B | CC_GET_CHIP_ID | |
0x90 | CC_READ_CODE_MEMORY | |
0x91 | CC_READ_XDATA_MEMORY | |
0x92 | CC_WRITE_XDATA_MEMORY | |
0x93 | CC_SET_PC | |
0x94 | CC_CLOCK_INIT | |
0x95 | CC_WRITE_FLASH_PAGE | |
0x96 | CC_READ_FLASH_PAGE | |
0x97 | CC_MASS_ERASE_FLASH | |
0x98 | CC_PROGRAM_FLASH | Copy 2kB to Flash. |
0x99 | CC_WIPEFLASHBUFFER | Wipe 2kB buffer to 0xFF. |
0x9A | CC_LOCKCHIP | Set security bits. |
Thanks
Thanks, and a beer, are due to Peter Kuhar, both for authoring the first open source Chipcon debugger and for the neighborly contribution of hardware.