From 1618a18e899bcec7f6a1c4ad884b84472fa67655 Mon Sep 17 00:00:00 2001 From: Iceman Date: Wed, 7 Feb 2018 19:39:04 +0100 Subject: [PATCH] fix: Configure MUX to push-pull state --- armsrc/appmain.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/armsrc/appmain.c b/armsrc/appmain.c index 76eda19e..bfab8eb6 100644 --- a/armsrc/appmain.c +++ b/armsrc/appmain.c @@ -1408,6 +1408,19 @@ void __attribute__((noreturn)) AppMain(void) // Reset SSC AT91C_BASE_SSC->SSC_CR = AT91C_SSC_SWRST; + // Configure MUX + AT91C_BASE_PIOA->PIO_OER = + GPIO_MUXSEL_HIPKD | + GPIO_MUXSEL_LOPKD | + GPIO_MUXSEL_LORAW | + GPIO_MUXSEL_HIRAW; + + AT91C_BASE_PIOA->PIO_PER = + GPIO_MUXSEL_HIPKD | + GPIO_MUXSEL_LOPKD | + GPIO_MUXSEL_LORAW | + GPIO_MUXSEL_HIRAW; + // set pins LOW LOW(GPIO_MUXSEL_HIPKD); LOW(GPIO_MUXSEL_LOPKD); -- 2.39.5