>
> This is wrong. ICSP is Microchip's proprietory protocol for
> programming and debugging. The ICSP module is independent
> from the EJTAG module in PIC32. You can read Chapter
> 33 of the PIC32MX Family Manual for more information.

I didn't make it up.

I read it.

PIC32MX Flash Programming Specification 61145D.pdf :

Section 5:

> 5.0 EJTAG vs. ICSP
> Programming is accomplished via the EJTAG module
> in the CPU core. EJTAG is connected to either the full
> set of JTAG pins, or a reduced 2-wire to 4-wire EJTAG
> interface. In both modes, programming of the PIC32MX
> Flash memory is accomplished through the ETAP
> controller. The TAP Controller uses the TMS pin to
> determine if instruction or data registers should be
> accessed in the shift path between TDI and TDO (see
> Figure 5-1).
...
> 2-Wire to 4-Wire:
> Converts 2-wire ICSP interface to 4-wire JTAG.
> • ETAP
> - Serially feeds instructions and data into CPU.
...
> 5.2 2-wire ICSP Details
> When in this mode the 2-wire ICSP signals are time
> multiplexed into the 2-wire to 4-wire block. The 2-wire
> to 4-wire block then converts the signals to look like a
> 4-wire JTAG port to the TAP controller.
> There are two possible modes of operation:
> • 4-Phase ICSP
> • 2-Phase ICSP
> 5.2.1 4-PHASE ICSP
> In 4-Phase ICSP, TDI, TDO, and TMS are multiplexed
> onto PGD in 4 clocks (see Figure 5-4). The Least Significant
> bit (LSb) is shifted first, and TDI and TMS are
> sampled on the falling edge of PGC while TDO is
> driven on the falling edge of PGC. 4-Phase mode is
> used for both read and write data transfers.
And there are some nice timing diagrams showing the TMS/TDI/TDO 
relationship to the clock over ICSP.

Plus PIC32MX talks about debugging using EJTAG. EJTAG is a MIPS Standard:
Which is publicly available (after you register) at:
http://www.mips.com/secure-download/index.cfm?filename=mips-architecture/MD00047%2D2B%2DEJTAG%2DSPC%2D04%5F14.pdf

EJTAG is designed for debugging. However that same functionality can be 
used to allow programming. PIC do not need to re-specify EJTAG, as that 
is available from MIPS. I have found no suggestion that the PIC32 does 
not implement a compliant EJTAG core, and as ICSP is just de-multiplexed 
into 4 wire jtag internally, there is no reason why EJTAG operations 
will not operate as expected over ICSP.

There are lots of MIPS chips that have an EJTAG core. An EJTAG 
implementation in OpenOCD would be awesome. PIC32 is a nice cheap 
platform to develop and test this with.

Strontium


Xiaofan Chen wrote:
> On Mon, May 18, 2009 at 8:58 AM, David Brownell <davi...@pacbell.net> wrote:
>   
>> On Sunday 17 May 2009, Strontium wrote:
>>     
>>> Pic32 has 2 debug interfaces.  4 Wire JTAG.  And a pin count compressed
>>> version of Jtag which is serialised over 2 wires (ICSP).  The protocol
>>> is the same as JTAG, the electrical interface is the only thing that
>>> differs. 2 wire mode should be able to be driven using a FT2232 type
>>> device, in a similar fashion to I2C (Tie TDI and TDO together).
>>>       
>
> The ICSP debugging protocol is kept secret by Microchip
> and Microchip does not want to released to public. NDA
> access might be possible for certain 3rd party. The ICSP
> programming protocol is open to the public through the
> programming specification.
>
> "To use ICD, an external system that supports ICD must load
> a debugger executive program into the microcontroller. This is
> automatically handled by many debugger tools, such as the
> MPLAB IDE. For PIC32MX devices, the program is loaded into
> the last page of the Boot Flash memory space. When not
> debugging, the application is free to use the last page of Boot
> Flash Memory. PIC32MX ICSP supports standard debugging
> functions including memory and register viewing and modification.
> Breakpoints can be set and the program execution may be
> stopped or started. In addition to these functions registers or
> memory contents can be viewed and modified while the
> CPU is running."
>
> The debug executive hex files are available from MPLAB installation.
>
> Microchip's tools like Real ICE, ICD 3, ICD 2 do not use
> EJTAG. But JTAG support is available from 3rd party.
> http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2602
>
>   
>> Is that 2-wire mode the same one that the JTAG folk have
>> been working with, or is it specific to Microchip?  Do
>> you know?
>>     
>
> As answered before, the 2-wire ICSP is not JTAG
> and the only way to know it is through reverse engineering.
> The only project I know of is the Piklab project which tries
> to support ICSP debugging with ICD 2.
>
> Anyway, to openocd, it is possible to support JTAG
> debugging/programming.
>
>
>   

_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to