aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/src/simtrace/sim_switch.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/src/simtrace/sim_switch.c')
-rw-r--r--firmware/src/simtrace/sim_switch.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/firmware/src/simtrace/sim_switch.c b/firmware/src/simtrace/sim_switch.c
index faf48f0..90067ac 100644
--- a/firmware/src/simtrace/sim_switch.c
+++ b/firmware/src/simtrace/sim_switch.c
@@ -59,9 +59,12 @@ static void sw_sim_irq(u_int32_t pio)
static void vcc_phone_irq(u_int32_t pio)
{
- if (!AT91F_PIO_IsInputSet(AT91C_BASE_PIOA, SIMTRACE_PIO_VCC_PHONE))
+ if (!AT91F_PIO_IsInputSet(AT91C_BASE_PIOA, SIMTRACE_PIO_VCC_PHONE)) {
DEBUGPCR("VCC_PHONE off");
- else
+ /* flush any pending req_ctx to make sure the next ATR
+ * will be aligned to position 0 */
+ iso_uart_flush();
+ } else
DEBUGPCR("VCC_PHONE on");
}