changeset 780:8a94593fb7ef

simagent: Tx delays reduced in spenh mode
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 13 Mar 2021 19:53:07 +0000
parents 8196bba46318
children 289733ff272b
files target-utils/simagent/tx.c
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/target-utils/simagent/tx.c	Sat Mar 13 19:47:06 2021 +0000
+++ b/target-utils/simagent/tx.c	Sat Mar 13 19:53:07 2021 +0000
@@ -11,11 +11,15 @@
 	u8 *bytes;
 	unsigned count;
 {
-	unsigned n, timeout;
+	unsigned n, timeout, delay;
 
+	if (conf1_reg & SIM_CONF1_ETU)
+		delay = 6000;
+	else
+		delay = 30000;
 	SIMREGS.conf1 = conf1_reg |= SIM_CONF1_TXRX;
 	if (count == 1)
-		wait_ARM_cycles(30000);
+		wait_ARM_cycles(delay);
 	(void) SIMREGS.it;
 	for (n = 0; ; ) {
 		SIMREGS.dtx = bytes[n++];
@@ -23,7 +27,7 @@
 			SIMREGS.conf1 = conf1_reg &= ~SIM_CONF1_TXRX;
 			return(0);
 		}
-		wait_ARM_cycles(30000);
+		wait_ARM_cycles(delay);
 		for (timeout = 12000; timeout; timeout--)
 			if (SIMREGS.it & SIM_IT_ITTX)
 				break;