summaryrefslogtreecommitdiff
path: root/firmware/src/simtrace/main_simtrace.c
diff options
context:
space:
mode:
authorKevin Redon <kevredon@mail.tsaitgaist.info>2011-12-18 08:35:20 +0100
committerHarald Welte <laforge@gnumonks.org>2011-12-18 08:35:20 +0100
commit2a3d3624be53a3d172465829ea92c824825ea120 (patch)
treeee6854ad55eb56614467cba0ff3d9019a432402a /firmware/src/simtrace/main_simtrace.c
parentebf16b4ddf0dcbadf96aebdec3304f703917fdc7 (diff)
Make sure we don't forward power _and_ supply SIM power at the same time
The FPF2005 has no reverse voltage blocker, this is why the 3.3V from the LDO flows back into VCC_PHONE. It even damages the chip (so says the datasheet) I corrected the double power source problem by disabling the LDO (see patch), but still 1.8V does not work and 3.0-3.3V is used. I have to look for other reasons.
Diffstat (limited to 'firmware/src/simtrace/main_simtrace.c')
-rw-r--r--firmware/src/simtrace/main_simtrace.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/firmware/src/simtrace/main_simtrace.c b/firmware/src/simtrace/main_simtrace.c
index f919690..733f060 100644
--- a/firmware/src/simtrace/main_simtrace.c
+++ b/firmware/src/simtrace/main_simtrace.c
@@ -65,8 +65,18 @@ static void simtrace_set_mode(enum simtrace_md mode)
/* switch VCC_SIM pin into output mode, as in the first
* generation prototype we use it directly to supply Vcc
* to the SIM */
+
+ /* pin unused in v1.0(p) and v1.1p */
AT91F_PIO_CfgOutput(AT91C_BASE_PIOA, SIMTRACE_PIO_VCC_SIM);
AT91F_PIO_SetOutput(AT91C_BASE_PIOA, SIMTRACE_PIO_VCC_SIM);
+ /* for v1.0(p) and v1.1p, VCC_SIM can either be powered by
+ * VCC_PHONE using SIM_PWRFWD, or by the LDO using
+ * SIM_PWREN. they should be set exclusive. per default
+ * use VCC_PHONE */
+ AT91F_PIO_CfgOutput(AT91C_BASE_PIOA, SIMTRACE_PIO_SIM_PWRFWD);
+ AT91F_PIO_SetOutput(AT91C_BASE_PIOA, SIMTRACE_PIO_SIM_PWRFWD);
+ AT91F_PIO_CfgOutput(AT91C_BASE_PIOA, SIMTRACE_PIO_SIM_PWREN);
+ AT91F_PIO_ClearOutput(AT91C_BASE_PIOA, SIMTRACE_PIO_SIM_PWREN);
/* switch UART0 pins to 'ISO7816 card mode' */
AT91F_PIO_CfgInput(AT91C_BASE_PIOA, UART0_PINS);
personal git repositories of Harald Welte. Your mileage may vary