diff options
author | Harald Welte <laforge@gnumonks.org> | 2010-11-18 15:29:43 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2010-11-18 15:29:43 +0100 |
commit | 629c4f81b89c41ffc2006b7af06ae734cdcbc864 (patch) | |
tree | 31846d3b3f310a231fa97060672fbac1246f81c8 /firmware/src | |
parent | 450a9326082248bcf62920f3ee078df8dcb07310 (diff) |
simtrace: fix problems causing bogus waiting time expirations
Diffstat (limited to 'firmware/src')
-rw-r--r-- | firmware/src/simtrace/tc_etu.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/firmware/src/simtrace/tc_etu.c b/firmware/src/simtrace/tc_etu.c index 93d2da0..fc52033 100644 --- a/firmware/src/simtrace/tc_etu.c +++ b/firmware/src/simtrace/tc_etu.c @@ -40,7 +40,10 @@ static __ramfunc void tc_etu_irq(void) //DEBUGPCR("tE"); nr_events = 0; /* Make sure we don't accept any additional external trigger */ - tcetu->TC_CMR &= ~AT91C_TC_ENETRG; + /* Enabling the line below will cause race conditions. We + * thus re-trigger at all zero-bits in the byte and thus wait + * up to 12 etu longer than required */ + //tcetu->TC_CMR &= ~AT91C_TC_ENETRG; } if (sr & AT91C_TC_CPCS) { @@ -74,6 +77,7 @@ void tc_etu_set_wtime(u_int16_t wtime) { waiting_time = wtime; recalc_nr_events(); + //DEBUGPCR("wtime=%u, actually waiting %u", wtime, wait_events * 12); } void tc_etu_set_etu(u_int16_t etu) |