From 47f12a1e9c75bf05fcb06fbc885f9b93848188a9 Mon Sep 17 00:00:00 2001 From: fenggnef Date: Fri, 11 Aug 2017 20:45:42 +0800 Subject: Definitions of MASK_GPIO_SHDN_SW and GPIO_AUX_PWR_ON Errors MASK_GPIO_SHDN_SW ( GPIO[52] ) should be shifted by "GPIO_SHDN_SW" but "GPIO_FX3_SCLK ". Otherwise GPIOs of FX3 will initial GPIO_FX3_SCLK ( GPIO[53] ) as GPIO and SPI respectively. It will make GPIO[53] conflict between SPI and GPIO, and SHDN_SW will not work properly as a power switch. --- firmware/fx3/b200/b200_main.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firmware/fx3/b200/b200_main.h b/firmware/fx3/b200/b200_main.h index 453e7034a..ddcc504b5 100644 --- a/firmware/fx3/b200/b200_main.h +++ b/firmware/fx3/b200/b200_main.h @@ -32,8 +32,8 @@ * that GPIOs < 32 are configured without the use of masks. */ #define MASK_GPIO_PROGRAM_B (uint32_t)(1 << (GPIO_PROGRAM_B - 32)) #define MASK_GPIO_INIT_B (uint32_t)(1 << (GPIO_INIT_B - 32)) -#define MASK_GPIO_AUX_PWR_ON (uint32_t)(1 << (GPIO_FX3_SCLK - 32)) -#define MASK_GPIO_SHDN_SW (uint32_t)(1 << (GPIO_FX3_SCLK - 32)) +#define MASK_GPIO_AUX_PWR_ON (uint32_t)(1 << (GPIO_AUX_PWR_ON - 32)) +#define MASK_GPIO_SHDN_SW (uint32_t)(1 << (GPIO_SHDN_SW - 32)) #define MASK_GPIO_FX3_SCLK (uint32_t)(1 << (GPIO_FX3_SCLK - 32)) #define MASK_GPIO_FX3_CE (uint32_t)(1 << (GPIO_FX3_CE - 32)) #define MASK_GPIO_FX3_MISO (uint32_t)(1 << (GPIO_FX3_MISO - 32)) -- cgit v1.2.3