Change in simtrace2[master]: qmod: output EEPROM data only on debug level, and add completion output

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Kévin Redon gerrit-no-reply at lists.osmocom.org
Tue Aug 28 17:44:07 UTC 2018


Kévin Redon has uploaded this change for review. ( https://gerrit.osmocom.org/10673


Change subject: qmod: output EEPROM data only on debug level, and add completion output
......................................................................

qmod: output EEPROM data only on debug level, and add completion output

the EEPROM byte output was causing data loss on the serial output,
resulting is automatic tests failing.
instead an end text will be output to detect the end of the procedure.

Change-Id: Ib8d3cbd01d0e34432d424355f4fafb24bc5273a1
---
M firmware/libboard/qmod/source/board_qmod.c
1 file changed, 5 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/73/10673/1

diff --git a/firmware/libboard/qmod/source/board_qmod.c b/firmware/libboard/qmod/source/board_qmod.c
index f04bc12..55efb54 100644
--- a/firmware/libboard/qmod/source/board_qmod.c
+++ b/firmware/libboard/qmod/source/board_qmod.c
@@ -90,11 +90,12 @@
 	TRACE_INFO("Verifying EEPROM...\n\r");
 	for (i = 0; i < ARRAY_SIZE(__eeprom_bin); i++) {
 		int byte = eeprom_read_byte(0x50, i);
-		TRACE_INFO("0x%02x: %02x\n\r", i, byte);
+		TRACE_DEBUG("0x%02x: %02x\n\r", i, byte);
 		if (byte != __eeprom_bin[i])
 			TRACE_ERROR("Byte %u is wrong, expected 0x%02x, found 0x%02x\n\r",
 					i, __eeprom_bin[i], byte);
 	}
+	TRACE_INFO("EEPROM written\n\r");
 
 	/* FIXME: Release PIN_PRTPWR_OVERRIDE after we know the hub is
 	 * again powering us up */
@@ -119,6 +120,7 @@
 			return 1;
 		}
 	}
+	TRACE_INFO("EEPROM erased\n\r");
 
 	return 0;
 }
@@ -163,13 +165,13 @@
 		UART_GetIntegerMinMax(&addr, 0, 255);
 		printf("Please enter EEPROM value:\n\r");
 		UART_GetIntegerMinMax(&val, 0, 255);
-		printf("Writing value 0x%02lx to EEPROM offset 0x%02lx\n\r", val, addr);
+		printf("Writing value 0x%02x to EEPROM offset 0x%02x\n\r", val, addr);
 		eeprom_write_byte(0x50, addr, val);
 		break;
 	case 'r':
 		printf("Please enter EEPROM offset:\n\r");
 		UART_GetIntegerMinMax(&addr, 0, 255);
-		printf("EEPROM[0x%02lx] = 0x%02x\n\r", addr, eeprom_read_byte(0x50, addr));
+		printf("EEPROM[0x%02x] = 0x%02x\n\r", addr, eeprom_read_byte(0x50, addr));
 		break;
 	default:
 		printf("Unknown command '%c'\n\r", ch);

-- 
To view, visit https://gerrit.osmocom.org/10673
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib8d3cbd01d0e34432d424355f4fafb24bc5273a1
Gerrit-Change-Number: 10673
Gerrit-PatchSet: 1
Gerrit-Owner: Kévin Redon <kredon at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180828/b8c86790/attachment.htm>


More information about the gerrit-log mailing list