summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Daniel <cd@maintech.de>2013-01-10 19:11:53 +0100
committerChristian Daniel <cd@maintech.de>2013-01-10 19:11:53 +0100
commita5a3280178cd01a9e6d709a7ea43ccc788442657 (patch)
treee8f54539e24907df3f030dae85fc21b30bcd362c
parent4952c3f05e90f1587db4721ce7dedbd69bdf0f8f (diff)
do more resets on twi hardware to resolve lockups
-rw-r--r--firmware/osmosdr-radioapp/src/driver/twi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/firmware/osmosdr-radioapp/src/driver/twi.c b/firmware/osmosdr-radioapp/src/driver/twi.c
index b840f49..25b9766 100644
--- a/firmware/osmosdr-radioapp/src/driver/twi.c
+++ b/firmware/osmosdr-radioapp/src/driver/twi.c
@@ -142,6 +142,8 @@ static void twiConfigureMaster(AT91S_TWI* twi, uint twck, uint mck)
twi->TWI_CR = AT91C_TWI_SVEN;
// Reset the TWI
twi->TWI_CR = AT91C_TWI_SWRST;
+ twi->TWI_CR = AT91C_TWI_SWRST;
+ twi->TWI_CR = AT91C_TWI_SWRST;
twi->TWI_RHR;
// TWI Slave Mode Disabled, TWI Master Mode Disabled