bitbang: Add flush before sleep
commit8df529fa663cef2004a6a26e8f147b8c96e03de9
authorAleksey Shargalin <myokaski@gmail.com>
Tue, 31 Oct 2017 14:23:40 +0000 (31 17:23 +0300)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 30 Dec 2023 13:10:08 +0000 (30 13:10 +0000)
tree5f0c654c765af0977383924b00699d6d45bf94ce
parent65fc586d6ee18813937ec0fdb264b9e0d4bc1c76
bitbang: Add flush before sleep

Some bitbang interfaces have no speed regulation and work as fast as
they can. Only the sequence of execuded commands is guaranteed but
not the timing. It works most of time with one exception: when the
JTAG_SLEEP command is executed, we expect that all previous commands
already finished so that the sleep interval is guaranteed.
For now  there may be situations when the sleep time has passed but
previous commands are not actually executed.
This patch adds a flush command to the bitbang interface, connects it
to the existing implementation for remote_bitbang, and runs it when
the JTAG_SLEEP command is executed.

Change-Id: If40894a63d29a260a4ded134b008df6dd1e89c46
Signed-off-by: Aleksey Shargalin <myokaski@gmail.com>
Signed-off-by: David Ryskalczyk <david.rysk@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/4284
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
src/jtag/drivers/bitbang.c
src/jtag/drivers/bitbang.h
src/jtag/drivers/remote_bitbang.c