From e95ccd8f1db1f43d729153a30f3b5cf84cbc6606 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 21 Jun 2011 09:32:48 +0200 Subject: 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. --- firmware/src/simtrace/main_simtrace.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'firmware') 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); -- cgit v1.2.3