On Thu, Apr 7, 2011 at 11:21 AM, Øyvind Harboe <oyvind.har...@zylin.com> wrote: > On Thu, Apr 7, 2011 at 11:14 AM, Drasko DRASKOVIC > <drasko.drasko...@gmail.com> wrote: >> Hi all, >> I have one general question regarding OpenOCD scans. >> >> What happens when we set some field.in_value = NULL, and in reality >> there are some bits that re shifted out on the scan chain ? Are they >> just ignored ? Does that pose the problem ? > > This tells the JTAG drivers to throw away the bits that are clocked in > (read from the TAP). The target hardware/TAP does not see a difference. > >> To give a concrete example, in the mips_ejtag.c we have something like : >> >> /* fastdata 1-bit register */ >> fields[0].num_bits = 1; >> fields[0].out_value = &spracc; >> fields[0].in_value = NULL; >> >> /* processor access data register 32 bit */ >> fields[1].num_bits = 32; >> fields[1].out_value = t; >> >> if (write_t) >> { >> fields[1].in_value = NULL; >> buf_set_u32(t, 0, 32, *data); >> } >> else >> { >> fields[1].in_value = (uint8_t *) data; >> } >> >> So, no values are received (because fields[0].in_value = NULL and >> fields[1].in_value = NULL), but in reality MIPS EJTAG shifts out 33 >> bits (one SPrAcc and 32 bits of DATA) upon this operation. >> >> My question is, in general, could not accepting these bits lead to >> some problems or collisions on data lines (or USB bus) ? > > The bits are simply ignored rather than stored in memory. The > protocol or target hardware is not affected as such.
Thanks Øyvind, this is what I thougth... Is there a special reason why not ignoring one bit, like : fields[0].in_value = &spracc_in instead fields[0].in_value = NULL in previos example gives : downloaded 361540 bytes in 182.220215s (1.938 KiB/s) in the place of previous downloaded 361540 bytes in 182.220215s (1.938 KiB/s) when fields[0].in_value was ignored (NULL) ? BTW. I use Amontec D2XX because otherwise libftdi dies when I change from fields[0].in_value = NULL to fields[0].in_value = &spracc. BR, Drasko _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development