From 2a3d3624be53a3d172465829ea92c824825ea120 Mon Sep 17 00:00:00 2001 From: Kevin Redon Date: Sun, 18 Dec 2011 08:35:20 +0100 Subject: 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. --- firmware/src/simtrace/main_simtrace.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'firmware/src/simtrace/main_simtrace.c') 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); -- cgit v1.2.3