From 3628c58e944973b27593e361cd182eb5f75e2507 Mon Sep 17 00:00:00 2001 From: Anthony Ferrara Date: Fri, 7 Feb 2020 11:11:44 -0500 Subject: [PATCH] Force enable and reset to be low when deiniting chip, they should not be left floating as per datasheet --- src/bsp/source/nm_bsp_arduino.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bsp/source/nm_bsp_arduino.c b/src/bsp/source/nm_bsp_arduino.c index b10674b4..dd7985bb 100644 --- a/src/bsp/source/nm_bsp_arduino.c +++ b/src/bsp/source/nm_bsp_arduino.c @@ -92,7 +92,8 @@ static void init_chip_pins(void) if (gi8Winc1501ChipEnPin > -1) { /* Configure CHIP_EN as pull-up */ - pinMode(gi8Winc1501ChipEnPin, INPUT_PULLUP); + pinMode(gi8Winc1501ChipEnPin, OUTPUT); + digitalWrite(gi8Winc1501ChipEnPin, HIGH); } } @@ -101,12 +102,11 @@ static void deinit_chip_pins(void) if (gi8Winc1501ResetPin > -1) { digitalWrite(gi8Winc1501ResetPin, LOW); - pinMode(gi8Winc1501ResetPin, INPUT); } if (gi8Winc1501ChipEnPin > -1) { - pinMode(gi8Winc1501ChipEnPin, INPUT); + digitalWrite(gi8Winc1501ChipEnPin, LOW); } }