From c31f2b6f78d90e288d5668d4a7115e1c2e7bf68e Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 8 Jan 2014 16:44:11 -0600 Subject: [PATCH] Fix STM32F103VE SPI3 definitions; Fix bug introduced in recent NX reorganization. From Steve Redler IV --- ChangeLog | 5 +++++ arch/arm/include/stm32/chip.h | 2 +- arch/arm/src/stm32/chip/stm32f103ze_pinmap.h | 5 +++++ graphics/nxsu/Make.defs | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ef93b992c7..5352a18572 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6393,4 +6393,9 @@ * libc/stdio/lib_libfgets.c: Common implementation supports all of the slightly different requirements of gets(), gets_s(), and fgets() (2014-1-7). + * arch/arm/include/stm32/chip.h and chip/stm32f103ze_pinmap.h: + various fixes for STM32F103ZE SPI3. From Steve Redler IV + (2014-1-7). + * graphics/nxsu/Make.defs: Typo that crept into build in recent + NX reorganization. Found by Steve Redler IV (2014-1-7). diff --git a/arch/arm/include/stm32/chip.h b/arch/arm/include/stm32/chip.h index 12fb73f7c7..183dfb0aa1 100644 --- a/arch/arm/include/stm32/chip.h +++ b/arch/arm/include/stm32/chip.h @@ -683,7 +683,7 @@ # define STM32_NGTIM 4 /* 16-bit generall timers TIM2,3,4,5 with DMA */ # define STM32_NBTIM 0 /* No basic timers */ # define STM32_NDMA 2 /* DMA1-2 */ -# define STM32_NSPI 2 /* SPI1-2 */ +# define STM32_NSPI 3 /* SPI1-3 */ # define STM32_NI2S 0 /* No I2S (?) */ # define STM32_NUSART 3 /* USART1-3 */ # define STM32_NI2C 2 /* I2C1-2 */ diff --git a/arch/arm/src/stm32/chip/stm32f103ze_pinmap.h b/arch/arm/src/stm32/chip/stm32f103ze_pinmap.h index 581b026a09..df1edbe757 100644 --- a/arch/arm/src/stm32/chip/stm32f103ze_pinmap.h +++ b/arch/arm/src/stm32/chip/stm32f103ze_pinmap.h @@ -325,6 +325,11 @@ # define GPIO_SPI1_MOSI (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN7) #endif +# define GPIO_SPI2_NSS (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN12) +# define GPIO_SPI2_SCK (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN13) +# define GPIO_SPI2_MISO (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN14) +# define GPIO_SPI2_MOSI (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN15) + #if defined(CONFIG_STM32_SPI3_REMAP) # define GPIO_SPI3_NSS (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN4) # define GPIO_SPI3_SCK (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN10) diff --git a/graphics/nxsu/Make.defs b/graphics/nxsu/Make.defs index 93abe9d816..26e2f090c0 100644 --- a/graphics/nxsu/Make.defs +++ b/graphics/nxsu/Make.defs @@ -40,5 +40,5 @@ NX_CSRCS += nx_filltrapezoid.c nx_getposition.c nx_getrectangle.c nx_kbdchin.c NX_CSRCS += nx_kbdin.c nx_lower.c nx_mousein.c nx_move.c nx_open.c NX_CSRCS += nx_openwindow.c nx_raise.c nx_redrawreq.c nx_releasebkgd.c NX_CSRCS += nx_requestbkgd.c nx_setpixel.c nx_setsize.c nx_setbgcolor.c -NX_CSRCS += nx_setposition.c nxsu_constructwindow.c nxsu_redrawreq.c +NX_CSRCS += nx_setposition.c nx_constructwindow.c nxsu_redrawreq.c NX_CSRCS += nxsu_reportposition.c