diff options
author | Harald Welte <laforge@gnumonks.org> | 2011-06-21 09:32:48 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2011-06-21 09:32:48 +0200 |
commit | e95ccd8f1db1f43d729153a30f3b5cf84cbc6606 (patch) | |
tree | f583a30524f463b31c31e6763d4857ce2fc2b98d | |
parent | db3dca00622c1c390e46315c0caaf93e3ed7bded (diff) |
simtrace: switch VCC_SIM into output mode, as we use it to supply Vcc
This is just a temp rework in the 1st generation prototype, as the bus
switch has too high resistance for passing throuhg Vcc from the phone
to the SIM.
-rw-r--r-- | firmware/src/simtrace/main_simtrace.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/firmware/src/simtrace/main_simtrace.c b/firmware/src/simtrace/main_simtrace.c index 8945a56..ed2921c 100644 --- a/firmware/src/simtrace/main_simtrace.c +++ b/firmware/src/simtrace/main_simtrace.c @@ -75,11 +75,17 @@ static void simtrace_set_mode(enum simtrace_md mode) switch (mode) { case SIMTRACE_MD_SNIFFER: DEBUGPCR("MODE: SNIFFER\n"); + /* switch UART1 pins to input, no pull-up */ AT91F_PIO_CfgInput(AT91C_BASE_PIOA, UART1_PINS); AT91F_PIO_CfgPullupDis(AT91C_BASE_PIOA, UART1_PINS); - AT91F_PIO_CfgInput(AT91C_BASE_PIOA, SIMTRACE_PIO_VCC_SIM); - AT91F_PIO_CfgPullupDis(AT91C_BASE_PIOA, SIMTRACE_PIO_VCC_SIM); + + /* switch VCC_SIM pin into output mode, as in the first + * generation prototype we use it directly to supply Vcc + * to the SIM */ + AT91F_PIO_CfgOutput(AT91C_BASE_PIOA, SIMTRACE_PIO_VCC_SIM); + AT91F_PIO_SetOutput(AT91C_BASE_PIOA, SIMTRACE_PIO_VCC_SIM); + /* switch UART0 pins to 'ISO7816 card mode' */ AT91F_PIO_CfgInput(AT91C_BASE_PIOA, UART0_PINS); AT91F_PIO_CfgPullupDis(AT91C_BASE_PIOA, UART0_PINS); |