I'm working on a setup (ft2232-based pod) that requires delays between certain JTAG commands for which I use the usleep command inside scripts. The usleep properly delays execution of each command but it seems that it doesn't affect the timing of the JTAG operations.
My guess is that only the chain/cable queueing is delayed but this delay is not effective when the queued low-level operations are streamed to the pod.
Example:
poke 0 0x1234
usleep 1000000
peek 0
Works fine in interactive mode, but fails (peek 0 returns the "undelayed" data) when executed from within a script. Script executing is delayed by 1 s, however.
A quick fix could be to add
chain_flush()
after jtag_parse_line() in jtag_parse_stream(). Similar to jtag_readline_multiple_commands_support().
Is this a valid fix or should the issue be addressed deeper in the command stack?
Arnim
Fixed in SVN r1418.