laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/simtrace2/+/27387 )


Change subject: simtrace: Enable VCC detection via ADC (voltage dependent)
......................................................................

simtrace: Enable VCC detection via ADC (voltage dependent)

SIMtrace should reject any card activation at 1.8V as it is a 3[.3]V device
without level shifters.  For this, we must include the ADC in
determining the VCC voltage.

Change-Id: Ic76f06037590ff1c0dae818d5eb2c2019dd75f2d
FIXME: reporting uses raw ADC voltage, not the voltage before divider
---
M firmware/libboard/simtrace/include/board.h
1 file changed, 4 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/87/27387/1

diff --git a/firmware/libboard/simtrace/include/board.h 
b/firmware/libboard/simtrace/include/board.h
index 7cb30b0..d6905ea 100644
--- a/firmware/libboard/simtrace/include/board.h
+++ b/firmware/libboard/simtrace/include/board.h
@@ -155,3 +155,7 @@
 #endif
 /* SIMtrace board supports man-in-the-middle mode */
 //#define HAVE_MITM
+
+#define DETECT_VCC_BY_ADC
+#define VCC_UV_THRESH_1V8      (1500000/2)     /* 10k/10k resistive divider 
halves voltage */
+#define VCC_UV_THRESH_3V       (2500000/2)     /* 10k/10k resistive divider 
halves voltage */

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

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-Change-Id: Ic76f06037590ff1c0dae818d5eb2c2019dd75f2d
Gerrit-Change-Number: 27387
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <[email protected]>
Gerrit-MessageType: newchange

Reply via email to