aboutsummaryrefslogtreecommitdiff
path: root/src/target/target.h
diff options
context:
space:
mode:
authorAndreas Fritiofson <andreas.fritiofson@gmail.com>2014-03-07 20:08:31 +0100
committerAndreas Fritiofson <andreas.fritiofson@gmail.com>2014-03-07 21:19:12 +0000
commit17fddb4289cb632a414d9780b3c2e60e368fa083 (patch)
tree2c37b0b8dc765482c9bec0cce714208f049f7f38 /src/target/target.h
parentd82490adfbb63716361b1867e7359b656de76ac6 (diff)
stlink: Use callback to increase frequency of trace data sampling
The ST-LINK/V2 has limited internal buffering, such that trace data can be missed if the target is generating data at a rate quicker than the OpenOCD trace sampling. The issue of lost data is compounded since individual TPIU packets may be split across individual STLINK_TRACE_EP reads, and misleading results can occur if mid-packet loss occurs. This patch increases the frequency of checking for pending trace data with the aim of minimising such losses. Note: With the limited (I/O and memory) bandwidth of the ST-LINK/V2 there cannot, however, be a guarantee against trace data loss. The timer callback is only added when enabling tracing, and is removed when tracing is disabled. Change-Id: Ibde9794b77793d3068f88cb5c1a26f9ceadcbd8a Signed-off-by: James G. Smith <jsmith@ecoscentric.com> Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1661 Tested-by: jenkins
Diffstat (limited to 'src/target/target.h')
-rw-r--r--src/target/target.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/target/target.h b/src/target/target.h
index 21b94eea..3ce164a2 100644
--- a/src/target/target.h
+++ b/src/target/target.h
@@ -328,7 +328,7 @@ int target_call_event_callbacks(struct target *target, enum target_event event);
*/
int target_register_timer_callback(int (*callback)(void *priv),
int time_ms, int periodic, void *priv);
-
+int target_unregister_timer_callback(int (*callback)(void *priv), void *priv);
int target_call_timer_callbacks(void);
/**
* Invoke this to ensure that e.g. polling timer callbacks happen before