# HG changeset patch # User Mychaela Falconia # Date 1615663913 0 # Node ID 3ba64341137b5692dae921c77502388e98441a04 # Parent 0cffc53991f967d50eaa551246a25bcc71e4ab26 simagent: bare Tx works with extra delays diff -r 0cffc53991f9 -r 3ba64341137b target-utils/simagent/tx.c --- a/target-utils/simagent/tx.c Fri Mar 12 23:58:15 2021 +0000 +++ b/target-utils/simagent/tx.c Sat Mar 13 19:31:53 2021 +0000 @@ -15,18 +15,21 @@ SIMREGS.conf1 = conf1_reg |= SIM_CONF1_TXRX; if (count == 1) - wait_ARM_cycles(372 * 4); /* wait 1 etu */ + wait_ARM_cycles(30000); + (void) SIMREGS.it; for (n = 0; ; ) { SIMREGS.dtx = bytes[n++]; if (n == count) { SIMREGS.conf1 = conf1_reg &= ~SIM_CONF1_TXRX; return(0); } + wait_ARM_cycles(30000); for (timeout = 12000; timeout; timeout--) if (SIMREGS.it & SIM_IT_ITTX) break; if (!timeout) { - printf("ERROR: SIM interface Tx timeout\n"); + printf("ERROR: SIM interface Tx timeout on byte %u\n", + n); return(-1); } }