Hello,

you can try configure with "--enable-verbose-jtag-io". All the jtag 
input/output is done in interface.c.



Regards,

Mathias


Am 15.02.2011 02:28, schrieb Rodrigo Rosa:
> Hi,
> 
> We've been trying to communicate via JTAG (through a signalyzer H2)
> with a freescale 568013.
> Modifying the code for the dsp56321 we were able to communicate with
> our chip. It has two taps, a MASTER tap and a CORE tap.
> 
> The default tap is the MASTER tap, and by default the CORE tap is
> disabled. There is a command to switch from the MASTER tap to the CORE
> tap and vice versa. Since it is a switch, only ONE tap is connected at
> a time.
> We need to make openocd know that the command that switches from
> MASTER to CORE disables MASTER (and the command to switch from CORE to
> MASTER disables CORE).
> The config file (see below) shows the hack we are currently using
> (empty disable functions).
> 
> #-----------------------------------------------------------------
> #-----------------------------------------------------------------
> # Script for freescale DSP568013
> #
> source [find interface/signalyzer-h2.cfg]
> 
> if { [info exists CHIPNAME] } {       
>    set  _CHIPNAME $CHIPNAME
> } else {      
>    set  _CHIPNAME dsp568013
> }
> 
> if { [info exists ENDIAN] } { 
>    set  _ENDIAN $ENDIAN
> } else {      
>   # this defaults to a big endian
>    set  _ENDIAN big
> }
> 
> if { [info exists CPUTAPID ] } {
>    set _CPUTAPID $CPUTAPID
> } else {
>   # force an error till we get a good number
>    set _CPUTAPID 0x01f2801d
> }
> 
> #jtag speed
> adapter_khz 10
> 
> #has only trst
> reset_config trst_only
> 
> #MASTER tap
> jtag newtap $_CHIPNAME chp -irlen 8 -ircapture 1 -irmask 0x03
> -expected-id $_CPUTAPID
> 
> #CORE tap
> jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 1 -irmask 0x03 -disable
> -expected-id 0x02211004
> 
> #target configuration
> set _TARGETNAME $_CHIPNAME.cpu
> #target create $_TARGETNAME dsp5680xx -endian $_ENDIAN -chain-position
> $_TARGETNAME
> 
> #select CORE tap by modifying the TLM register.
> #to be used when MASTER tap is selected.
> jtag configure $_TARGETNAME -event tap-enable "
>      irscan $_CHIPNAME.chp 0x05;
>      drscan $_CHIPNAME.chp 4 0x02;
>      jtag tapdisable $_CHIPNAME.chp;
> "
> 
> #select MASTER tap by modifying the TLM register.
> #to be used when CORE tap is selected.
> jtag configure $_CHIPNAME.chp -event tap-enable "
>      irscan $_TARGETNAME 0x4;
>      drscan $_TARGETNAME 4 0x1;
>      jtag tapdisable $_TARGETNAME;
> "
> 
> jtag configure $_TARGETNAME -event tap-disable {
> }
> 
> jtag configure $_CHIPNAME.chp -event tap-disable {
> }
> 
> #working area at base of ram
> #$_TARGETNAME configure -work-area-virt 0
> 
> #-----------------------------------------------------------------
> #-----------------------------------------------------------------
> 
> The tap seems to switch. After switching we can get what we believe is
> the CORE tap's IDCODE by executing:
> 
>> scan_chain
>    TapName             Enabled  IdCode     Expected   IrLen IrCap IrMask
> -- ------------------- -------- ---------- ---------- ----- ----- ------
>  0 dsp568013.chp          Y     0x01f2801d 0x01f2801d     8 0x01  0x03
>  1 dsp568013.cpu          n     0x00000000 0x02211004     4 0x01  0x03
>> jtag tapenable dsp568013.cpu
> JTAG tap: dsp568013.chp disabled
> JTAG tap: dsp568013.cpu enabled
> 1
>> scan_chain
>    TapName             Enabled  IdCode     Expected   IrLen IrCap IrMask
> -- ------------------- -------- ---------- ---------- ----- ----- ------
>  0 dsp568013.chp          n     0x01f2801d 0x01f2801d     8 0x01  0x03
>  1 dsp568013.cpu          Y     0x00000000 0x02211004     4 0x01  0x03
>> irscan dsp568013.cpu 0x2
>> drscan dsp568013.cpu 32 0
> 02211004
>>
> 
> Switching back to the MASTER tap does not seem to work correctly.
> After switching to the CORE tap and back to the MASTER tap we cannot
> execute IDCODE successfully.
> We get the following on telnet:
> 
>> jtag tapenable dsp568013.chp
> JTAG tap: dsp568013.cpu disabled
> JTAG tap: dsp568013.chp enabled
> 1
>> irscan dsp568013.chp 0x02
>> drscan dsp568013.chp 32 0
> 00000000
>> drscan dsp568013.chp 32 0
> 00000000
>> drscan dsp568013.chp 32 2
> 00000004
> 
> looks like the tap is working in BYPASS. if we run "pathmove RESET"
> everything works fine again:
> 
>> pathmove RESET
>> irscan dsp568013.chp 0x02
>> drscan dsp568013.chp 32 0
> 01F2801D
> 
> What is the correct way to do the switching?
> 
> Also, is there any way to get irscan to show what was shifted in?
> 
> Thanks!
> 
> --
> Rodrigo.
> _______________________________________________
> Openocd-development mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/openocd-development
> 

_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to