2012/11/25 Andreas Fritiofson <[email protected]>:
>
> On Sat, Nov 24, 2012 at 11:11 PM, Franck Jullien <[email protected]>
> wrote:
>>
>> 2012/11/24 Franck Jullien <[email protected]>:
>> > 2012/11/24 Franck Jullien <[email protected]>:
>>
>> >> I'm doing some tests with an opencores TAP and debug system using
>> >> openOCD and an ftdi based JTAG interface.
>> >> I'm using the new ftdi driver but I have a problem.
>> >>
>> >> When I want to do a DR SCAN of one bit and then stay in DR SCAN, I
>> >> have TMS signal rising....
>> >> If someone familiar with the ftdi driver could take a look at the
>> >> waveform and test code:
>> >>
>> >> http://pastie.org/5429202
>> >> http://picpaste.com/pics/jtag-22Kzxqqn.1353794728.png
>> >>
>> >> (I also tested the ft2232_libftdi driver with the same result).
>> >>
>> >> Franck.
>> >
>> > I forgot to paste the debug logs:
>> >
>> > ------------------------------
>> > tap state is RUN/IDLE
>> > DRSCAN type:1
>> > start=RUN/IDLE goal=DRSHIFT
>> > in field 0/1 1 bits
>> > DR scan, 1 bits, end in DRSHIFT
>> > ------------------------------
>> > tap state is DRSHIFT
>> > DRSCAN type:1
>> > in field 0/1 1 bits
>> > DR scan, 1 bits, end in DRSHIFT
>> >
>> >
>> > Franck.
>>
>> And I also forgot to say that after this 1 bit scan, on the next 32
>> bits DR SCAN, there is not TCK generated, JTAG signals are not moving
>> anymore....
>>
>
> Hi!
>
> I'll see if if I can find some time to look into this. It would be good if
> you could extend your code snippet above to generate the complete sequence
> that shows the issue, i.e. including the following scan that doesn't work.
> Looking only at your example it seems to work as expected (apart from the
> peculiarity that tms is toggling but that in itself is not a problem since
> there are no clocks).
>
> What are you trying to do? Repeatedly clocking data out of DR without going
> through DRCAPTURE? Is it supposed to work like that?
>
> /Andreas
>
Hi,
Thanks for your answer.
I need to stay in DRSHIFT until I get a '1' out of TDO, then read some
bytes without moving the TAP.
So I'm doing something like this:
int adbg_wb_burst_read(struct or1k_jtag *jtag_info, int word_size_bytes,
int word_count, unsigned long start_address, void *data)
{
/*....*/
/* Get 1 status bit, then word_size_bytes*8 bits */
status = 0;
#if REMOVE_THIS_AND_IT_WORKS
field[0].num_bits = 1;
field[0].out_value = NULL;
field[0].in_value = (uint8_t *)&status;
while (!(status & BURST_READ_READY) && retry < MAX_READ_STATUS_WAIT) {
jtag_add_dr_scan(tap, 1, &field[0], TAP_DRSHIFT);
jtag_execute_queue();
retry++;
}
#endif
/*......*/
/* When we are ready, read some bytes */
jtag_add_dr_scan(tap, nb_fields, field, TAP_IDLE);
jtag_execute_queue();
/*......*/
return ERROR_OK;
}
Here you can find the waveform with and without the polling for status bit:
http://picpaste.com/pics/jtag_1-NtI4rr5S.1353850723.png
I'll try to run openocd with gdb to see what's going on.....
This code works with the usb-blaster driver.
Franck.
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel