FreeCalypso > hg > freecalypso-tools
changeset 778:3ba64341137b
simagent: bare Tx works with extra delays
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 13 Mar 2021 19:31:53 +0000 |
parents | 0cffc53991f9 |
children | 8196bba46318 |
files | target-utils/simagent/tx.c |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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); } }