mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
arch/arm/src/stm32l4: Added custom pin mapping for STM32L4X2XX processors.
This commit is contained in:
committed by
Gregory Nutt
parent
a3f80e1894
commit
9223123cd2
@@ -76,7 +76,7 @@
|
|||||||
|
|
||||||
#define STM32L4_IRQ_FIRST (16) /* Vector number of the first external interrupt */
|
#define STM32L4_IRQ_FIRST (16) /* Vector number of the first external interrupt */
|
||||||
|
|
||||||
#if defined(CONFIG_STM32L4_STM32L4X3)
|
#if defined(CONFIG_STM32L4_STM32L4X2) || defined(CONFIG_STM32L4_STM32L4X3)
|
||||||
# include <arch/stm32l4/stm32l4x3xx_irq.h>
|
# include <arch/stm32l4/stm32l4x3xx_irq.h>
|
||||||
#elif defined(CONFIG_STM32L4_STM32L4X5)
|
#elif defined(CONFIG_STM32L4_STM32L4X5)
|
||||||
# include <arch/stm32l4/stm32l4x5xx_irq.h>
|
# include <arch/stm32l4/stm32l4x5xx_irq.h>
|
||||||
|
|||||||
@@ -54,9 +54,13 @@
|
|||||||
* NVIC. This does, however, waste several words of memory in the IRQ to handle mapping tables.
|
* NVIC. This does, however, waste several words of memory in the IRQ to handle mapping tables.
|
||||||
*
|
*
|
||||||
* Processor Exceptions (vectors 0-15). These common definitions can be found in the file
|
* Processor Exceptions (vectors 0-15). These common definitions can be found in the file
|
||||||
* nuttx/arch/arm/include/stm32f7/irq.h which includes this file
|
* nuttx/arch/arm/include/stm32l4/irq.h which includes this file
|
||||||
*
|
*
|
||||||
* External interrupts (vectors >= 16)
|
* External interrupts (vectors >= 16)
|
||||||
|
*
|
||||||
|
* These interrupts vectors was implemented based on RM0394 Table 45 and should work for
|
||||||
|
* STM32L431xx, STM32L451xx, STM32L4X2 and STM32L4X3.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define STM32L4_IRQ_WWDG (STM32L4_IRQ_FIRST + 0) /* 0: Window Watchdog interrupt */
|
#define STM32L4_IRQ_WWDG (STM32L4_IRQ_FIRST + 0) /* 0: Window Watchdog interrupt */
|
||||||
@@ -71,12 +75,12 @@
|
|||||||
#define STM32L4_IRQ_EXTI2 (STM32L4_IRQ_FIRST + 8) /* 8: EXTI Line 2 interrupt */
|
#define STM32L4_IRQ_EXTI2 (STM32L4_IRQ_FIRST + 8) /* 8: EXTI Line 2 interrupt */
|
||||||
#define STM32L4_IRQ_EXTI3 (STM32L4_IRQ_FIRST + 9) /* 9: EXTI Line 3 interrupt */
|
#define STM32L4_IRQ_EXTI3 (STM32L4_IRQ_FIRST + 9) /* 9: EXTI Line 3 interrupt */
|
||||||
#define STM32L4_IRQ_EXTI4 (STM32L4_IRQ_FIRST + 10) /* 10: EXTI Line 4 interrupt */
|
#define STM32L4_IRQ_EXTI4 (STM32L4_IRQ_FIRST + 10) /* 10: EXTI Line 4 interrupt */
|
||||||
#define STM32L4_IRQ_DMA1CH1 (STM32L4_IRQ_FIRST + 11) /* 12: DMA1 Channel 1 global interrupt */
|
#define STM32L4_IRQ_DMA1CH1 (STM32L4_IRQ_FIRST + 11) /* 11: DMA1 Channel 1 global interrupt */
|
||||||
#define STM32L4_IRQ_DMA1CH2 (STM32L4_IRQ_FIRST + 12) /* 13: DMA1 Channel 2 global interrupt */
|
#define STM32L4_IRQ_DMA1CH2 (STM32L4_IRQ_FIRST + 12) /* 12: DMA1 Channel 2 global interrupt */
|
||||||
#define STM32L4_IRQ_DMA1CH3 (STM32L4_IRQ_FIRST + 13) /* 14: DMA1 Channel 3 global interrupt */
|
#define STM32L4_IRQ_DMA1CH3 (STM32L4_IRQ_FIRST + 13) /* 13: DMA1 Channel 3 global interrupt */
|
||||||
#define STM32L4_IRQ_DMA1CH4 (STM32L4_IRQ_FIRST + 14) /* 15: DMA1 Channel 4 global interrupt */
|
#define STM32L4_IRQ_DMA1CH4 (STM32L4_IRQ_FIRST + 14) /* 14: DMA1 Channel 4 global interrupt */
|
||||||
#define STM32L4_IRQ_DMA1CH5 (STM32L4_IRQ_FIRST + 15) /* 16: DMA1 Channel 5 global interrupt */
|
#define STM32L4_IRQ_DMA1CH5 (STM32L4_IRQ_FIRST + 15) /* 15: DMA1 Channel 5 global interrupt */
|
||||||
#define STM32L4_IRQ_DMA1CH6 (STM32L4_IRQ_FIRST + 16) /* 17: DMA1 Channel 6 global interrupt */
|
#define STM32L4_IRQ_DMA1CH6 (STM32L4_IRQ_FIRST + 16) /* 16: DMA1 Channel 6 global interrupt */
|
||||||
#define STM32L4_IRQ_DMA1CH7 (STM32L4_IRQ_FIRST + 17) /* 17: DMA1 Channel 7 global interrupt */
|
#define STM32L4_IRQ_DMA1CH7 (STM32L4_IRQ_FIRST + 17) /* 17: DMA1 Channel 7 global interrupt */
|
||||||
#define STM32L4_IRQ_ADC1 (STM32L4_IRQ_FIRST + 18) /* 18: ADC1 global interrupt */
|
#define STM32L4_IRQ_ADC1 (STM32L4_IRQ_FIRST + 18) /* 18: ADC1 global interrupt */
|
||||||
#define STM32L4_IRQ_CAN1TX (STM32L4_IRQ_FIRST + 19) /* 19: CAN1 TX interrupts */
|
#define STM32L4_IRQ_CAN1TX (STM32L4_IRQ_FIRST + 19) /* 19: CAN1 TX interrupts */
|
||||||
@@ -143,7 +147,7 @@
|
|||||||
#define STM32L4_IRQ_I2C4EV (STM32L4_IRQ_FIRST + 83) /* 83: I2C4 event interrupt */
|
#define STM32L4_IRQ_I2C4EV (STM32L4_IRQ_FIRST + 83) /* 83: I2C4 event interrupt */
|
||||||
#define STM32L4_IRQ_I2C4ER (STM32L4_IRQ_FIRST + 84) /* 84: I2C4 error interrupt */
|
#define STM32L4_IRQ_I2C4ER (STM32L4_IRQ_FIRST + 84) /* 84: I2C4 error interrupt */
|
||||||
|
|
||||||
#if defined(CONFIG_STM32L4_STM32L4X3)
|
#if defined(CONFIG_STM32L4_STM32L4X2) || defined(CONFIG_STM32L4_STM32L4X3)
|
||||||
# define STM32L4_IRQ_NEXTINTS 85
|
# define STM32L4_IRQ_NEXTINTS 85
|
||||||
#else
|
#else
|
||||||
# error "Unsupported STM32L4 chip"
|
# error "Unsupported STM32L4 chip"
|
||||||
|
|||||||
@@ -400,7 +400,14 @@ config STM32L4_STM32L4X1
|
|||||||
config STM32L4_STM32L4X2
|
config STM32L4_STM32L4X2
|
||||||
bool
|
bool
|
||||||
default n
|
default n
|
||||||
select STM32L4_STM32L4X3
|
select ARCH_HAVE_FPU
|
||||||
|
select STM32L4_HAVE_USART1
|
||||||
|
select STM32L4_HAVE_USART2
|
||||||
|
select STM32L4_HAVE_UART3
|
||||||
|
select STM32L4_HAVE_LPTIM1
|
||||||
|
select STM32L4_HAVE_LPTIM2
|
||||||
|
select STM32L4_HAVE_COMP
|
||||||
|
select STM32L4_HAVE_SAI1
|
||||||
|
|
||||||
config STM32L4_STM32L4X3
|
config STM32L4_STM32L4X3
|
||||||
bool
|
bool
|
||||||
|
|||||||
@@ -44,7 +44,9 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
|
|
||||||
#if defined(CONFIG_STM32L4_STM32L4X3)
|
#if defined(CONFIG_STM32L4_STM32L4X2)
|
||||||
|
# include "chip/stm32l4x2xx_pinmap.h"
|
||||||
|
#elif defined(CONFIG_STM32L4_STM32L4X3)
|
||||||
# include "chip/stm32l4x3xx_pinmap.h"
|
# include "chip/stm32l4x3xx_pinmap.h"
|
||||||
#elif defined(CONFIG_STM32L4_STM32L4X5)
|
#elif defined(CONFIG_STM32L4_STM32L4X5)
|
||||||
# include "chip/stm32l4x5xx_pinmap.h"
|
# include "chip/stm32l4x5xx_pinmap.h"
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
|
|
||||||
#if defined(CONFIG_STM32L4_STM32L4X3)
|
#if defined(CONFIG_STM32L4_STM32L4X2) || defined(CONFIG_STM32L4_STM32L4X3)
|
||||||
# include "chip/stm32l4x3xx_syscfg.h"
|
# include "chip/stm32l4x3xx_syscfg.h"
|
||||||
#elif defined(CONFIG_STM32L4_STM32L4X5)
|
#elif defined(CONFIG_STM32L4_STM32L4X5)
|
||||||
# include "chip/stm32l4x5xx_syscfg.h"
|
# include "chip/stm32l4x5xx_syscfg.h"
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -136,38 +136,17 @@
|
|||||||
|
|
||||||
/* DAC */
|
/* DAC */
|
||||||
|
|
||||||
#define GPIO_DAC1_OUT (GPIO_ANALOG|GPIO_PORTA|GPIO_PIN4)
|
#define GPIO_DAC1_OUT_1 (GPIO_ANALOG|GPIO_PORTA|GPIO_PIN4)
|
||||||
|
#define GPIO_DAC1_OUT_2 (GPIO_ANALOG|GPIO_PORTA|GPIO_PIN5)
|
||||||
/* Digital Filter for Sigma-Delta Modulators (DFSDM) */
|
|
||||||
|
|
||||||
#define GPIO_DFSDM_DATIN0_1 (GPIO_ALT|GPIO_AF6 |GPIO_PORTB|GPIO_PIN1)
|
|
||||||
#define GPIO_DFSDM_DATIN0_2 (GPIO_ALT|GPIO_AF6 |GPIO_PORTD|GPIO_PIN3)
|
|
||||||
#define GPIO_DFSDM_DATIN1_1 (GPIO_ALT|GPIO_AF6 |GPIO_PORTB|GPIO_PIN12)
|
|
||||||
#define GPIO_DFSDM_DATIN1_2 (GPIO_ALT|GPIO_AF6 |GPIO_PORTD|GPIO_PIN6)
|
|
||||||
#define GPIO_DFSDM_DATIN2_1 (GPIO_ALT|GPIO_AF6 |GPIO_PORTB|GPIO_PIN14)
|
|
||||||
#define GPIO_DFSDM_DATIN2_2 (GPIO_ALT|GPIO_AF6 |GPIO_PORTE|GPIO_PIN7)
|
|
||||||
#define GPIO_DFSDM_DATIN3_1 (GPIO_ALT|GPIO_AF6 |GPIO_PORTC|GPIO_PIN7)
|
|
||||||
#define GPIO_DFSDM_DATIN3_2 (GPIO_ALT|GPIO_AF6 |GPIO_PORTE|GPIO_PIN4)
|
|
||||||
|
|
||||||
#define GPIO_DFSDM_CKIN0_1 (GPIO_ALT|GPIO_AF6 |GPIO_PORTB|GPIO_PIN2)
|
|
||||||
#define GPIO_DFSDM_CKIN0_2 (GPIO_ALT|GPIO_AF6 |GPIO_PORTD|GPIO_PIN4)
|
|
||||||
#define GPIO_DFSDM_CKIN1_1 (GPIO_ALT|GPIO_AF6 |GPIO_PORTB|GPIO_PIN13)
|
|
||||||
#define GPIO_DFSDM_CKIN1_2 (GPIO_ALT|GPIO_AF6 |GPIO_PORTD|GPIO_PIN7)
|
|
||||||
#define GPIO_DFSDM_CKIN2_1 (GPIO_ALT|GPIO_AF6 |GPIO_PORTB|GPIO_PIN15)
|
|
||||||
#define GPIO_DFSDM_CKIN2_2 (GPIO_ALT|GPIO_AF6 |GPIO_PORTE|GPIO_PIN8)
|
|
||||||
#define GPIO_DFSDM_CKIN3_1 (GPIO_ALT|GPIO_AF6 |GPIO_PORTC|GPIO_PIN6)
|
|
||||||
#define GPIO_DFSDM_CKIN3_2 (GPIO_ALT|GPIO_AF6 |GPIO_PORTE|GPIO_PIN5)
|
|
||||||
|
|
||||||
#define GPIO_DFSDM_CKOUT_1 (GPIO_ALT|GPIO_AF6 |GPIO_PORTA|GPIO_PIN5)
|
|
||||||
#define GPIO_DFSDM_CKOUT_2 (GPIO_ALT|GPIO_AF6 |GPIO_PORTC|GPIO_PIN2)
|
|
||||||
#define GPIO_DFSDM_CKOUT_3 (GPIO_ALT|GPIO_AF6 |GPIO_PORTE|GPIO_PIN9)
|
|
||||||
|
|
||||||
/* I2C */
|
/* I2C */
|
||||||
|
|
||||||
#define GPIO_I2C1_SDA_1 (GPIO_ALT|GPIO_AF4 |GPIO_OPENDRAIN|GPIO_PORTB|GPIO_PIN7)
|
#define GPIO_I2C1_SDA_1 (GPIO_ALT|GPIO_AF4 |GPIO_OPENDRAIN|GPIO_PORTB|GPIO_PIN7)
|
||||||
#define GPIO_I2C1_SDA_2 (GPIO_ALT|GPIO_AF4 |GPIO_OPENDRAIN|GPIO_PORTB|GPIO_PIN9)
|
#define GPIO_I2C1_SDA_2 (GPIO_ALT|GPIO_AF4 |GPIO_OPENDRAIN|GPIO_PORTB|GPIO_PIN9)
|
||||||
|
#define GPIO_I2C1_SDA_3 (GPIO_ALT|GPIO_AF4 |GPIO_OPENDRAIN|GPIO_PORTA|GPIO_PIN10)
|
||||||
#define GPIO_I2C1_SCL_1 (GPIO_ALT|GPIO_AF4 |GPIO_OPENDRAIN|GPIO_PORTB|GPIO_PIN6)
|
#define GPIO_I2C1_SCL_1 (GPIO_ALT|GPIO_AF4 |GPIO_OPENDRAIN|GPIO_PORTB|GPIO_PIN6)
|
||||||
#define GPIO_I2C1_SCL_2 (GPIO_ALT|GPIO_AF4 |GPIO_OPENDRAIN|GPIO_PORTB|GPIO_PIN8)
|
#define GPIO_I2C1_SCL_2 (GPIO_ALT|GPIO_AF4 |GPIO_OPENDRAIN|GPIO_PORTB|GPIO_PIN8)
|
||||||
|
#define GPIO_I2C1_SCL_3 (GPIO_ALT|GPIO_AF4 |GPIO_OPENDRAIN|GPIO_PORTA|GPIO_PIN9)
|
||||||
#define GPIO_I2C1_SMBA_1 (GPIO_ALT|GPIO_AF4 |GPIO_PORTA|GPIO_PIN1)
|
#define GPIO_I2C1_SMBA_1 (GPIO_ALT|GPIO_AF4 |GPIO_PORTA|GPIO_PIN1)
|
||||||
#define GPIO_I2C1_SMBA_2 (GPIO_ALT|GPIO_AF4 |GPIO_PORTA|GPIO_PIN14)
|
#define GPIO_I2C1_SMBA_2 (GPIO_ALT|GPIO_AF4 |GPIO_PORTA|GPIO_PIN14)
|
||||||
#define GPIO_I2C1_SMBA_3 (GPIO_ALT|GPIO_AF4 |GPIO_PORTB|GPIO_PIN5)
|
#define GPIO_I2C1_SMBA_3 (GPIO_ALT|GPIO_AF4 |GPIO_PORTB|GPIO_PIN5)
|
||||||
@@ -207,8 +186,10 @@
|
|||||||
|
|
||||||
#define GPIO_QSPI_NCS_1 (GPIO_ALT|GPIO_AF10|GPIO_PORTB|GPIO_PIN11)
|
#define GPIO_QSPI_NCS_1 (GPIO_ALT|GPIO_AF10|GPIO_PORTB|GPIO_PIN11)
|
||||||
#define GPIO_QSPI_NCS_2 (GPIO_ALT|GPIO_AF10|GPIO_PORTE|GPIO_PIN11)
|
#define GPIO_QSPI_NCS_2 (GPIO_ALT|GPIO_AF10|GPIO_PORTE|GPIO_PIN11)
|
||||||
|
#define GPIO_QSPI_NCS_3 (GPIO_ALT|GPIO_AF10|GPIO_PORTA|GPIO_PIN2)
|
||||||
#define GPIO_QSPI_CLK_1 (GPIO_ALT|GPIO_AF10|GPIO_PORTB|GPIO_PIN10)
|
#define GPIO_QSPI_CLK_1 (GPIO_ALT|GPIO_AF10|GPIO_PORTB|GPIO_PIN10)
|
||||||
#define GPIO_QSPI_CLK_2 (GPIO_ALT|GPIO_AF10|GPIO_PORTE|GPIO_PIN10)
|
#define GPIO_QSPI_CLK_2 (GPIO_ALT|GPIO_AF10|GPIO_PORTE|GPIO_PIN10)
|
||||||
|
#define GPIO_QSPI_CLK_3 (GPIO_ALT|GPIO_AF10|GPIO_PORTA|GPIO_PIN3)
|
||||||
#define GPIO_QSPI_BK1_IO0_1 (GPIO_ALT|GPIO_AF10|GPIO_PORTB|GPIO_PIN1)
|
#define GPIO_QSPI_BK1_IO0_1 (GPIO_ALT|GPIO_AF10|GPIO_PORTB|GPIO_PIN1)
|
||||||
#define GPIO_QSPI_BK1_IO0_2 (GPIO_ALT|GPIO_AF10|GPIO_PORTE|GPIO_PIN12)
|
#define GPIO_QSPI_BK1_IO0_2 (GPIO_ALT|GPIO_AF10|GPIO_PORTE|GPIO_PIN12)
|
||||||
#define GPIO_QSPI_BK1_IO1_1 (GPIO_ALT|GPIO_AF10|GPIO_PORTB|GPIO_PIN0)
|
#define GPIO_QSPI_BK1_IO1_1 (GPIO_ALT|GPIO_AF10|GPIO_PORTB|GPIO_PIN0)
|
||||||
@@ -218,6 +199,12 @@
|
|||||||
#define GPIO_QSPI_BK1_IO3_1 (GPIO_ALT|GPIO_AF10|GPIO_PORTA|GPIO_PIN6)
|
#define GPIO_QSPI_BK1_IO3_1 (GPIO_ALT|GPIO_AF10|GPIO_PORTA|GPIO_PIN6)
|
||||||
#define GPIO_QSPI_BK1_IO3_2 (GPIO_ALT|GPIO_AF10|GPIO_PORTE|GPIO_PIN15)
|
#define GPIO_QSPI_BK1_IO3_2 (GPIO_ALT|GPIO_AF10|GPIO_PORTE|GPIO_PIN15)
|
||||||
|
|
||||||
|
#define GPIO_QSPI_BK2_NCS_1 (GPIO_ALT|GPIO_AF10|GPIO_PORTD|GPIO_PIN3)
|
||||||
|
#define GPIO_QSPI_BK2_IO0_1 (GPIO_ALT|GPIO_AF10|GPIO_PORTD|GPIO_PIN4)
|
||||||
|
#define GPIO_QSPI_BK2_IO1_1 (GPIO_ALT|GPIO_AF10|GPIO_PORTD|GPIO_PIN5)
|
||||||
|
#define GPIO_QSPI_BK2_IO2_1 (GPIO_ALT|GPIO_AF10|GPIO_PORTD|GPIO_PIN6)
|
||||||
|
#define GPIO_QSPI_BK2_IO3_1 (GPIO_ALT|GPIO_AF10|GPIO_PORTD|GPIO_PIN7)
|
||||||
|
|
||||||
/* RTC */
|
/* RTC */
|
||||||
|
|
||||||
#define GPIO_RTC_OUT (GPIO_ALT|GPIO_AF0 |GPIO_PORTB|GPIO_PIN2)
|
#define GPIO_RTC_OUT (GPIO_ALT|GPIO_AF0 |GPIO_PORTB|GPIO_PIN2)
|
||||||
@@ -225,26 +212,37 @@
|
|||||||
|
|
||||||
/* SAI */
|
/* SAI */
|
||||||
|
|
||||||
#define GPIO_SAI1_EXTCLK (GPIO_ALT|GPIO_AF13|GPIO_PORTA|GPIO_PIN0)
|
#define GPIO_SAI1_EXTCLK_1 (GPIO_ALT|GPIO_AF13|GPIO_PORTA|GPIO_PIN0)
|
||||||
|
#define GPIO_SAI1_EXTCLK_2 (GPIO_ALT|GPIO_AF13|GPIO_PORTB|GPIO_PIN0)
|
||||||
|
|
||||||
#define GPIO_SAI1_FS_A_1 (GPIO_ALT|GPIO_AF13|GPIO_PORTB|GPIO_PIN9)
|
#define GPIO_SAI1_FS_A_1 (GPIO_ALT|GPIO_AF13|GPIO_PORTB|GPIO_PIN9)
|
||||||
#define GPIO_SAI1_FS_A_2 (GPIO_ALT|GPIO_AF13|GPIO_PORTE|GPIO_PIN4)
|
#define GPIO_SAI1_FS_A_2 (GPIO_ALT|GPIO_AF13|GPIO_PORTE|GPIO_PIN4)
|
||||||
|
#define GPIO_SAI1_FS_A_3 (GPIO_ALT|GPIO_AF13|GPIO_PORTA|GPIO_PIN9)
|
||||||
|
#define GPIO_SAI1_FS_A_4 (GPIO_ALT|GPIO_AF13|GPIO_PORTB|GPIO_PIN12)
|
||||||
#define GPIO_SAI1_SCK_A_1 (GPIO_ALT|GPIO_AF13|GPIO_PORTB|GPIO_PIN10)
|
#define GPIO_SAI1_SCK_A_1 (GPIO_ALT|GPIO_AF13|GPIO_PORTB|GPIO_PIN10)
|
||||||
#define GPIO_SAI1_SCK_A_2 (GPIO_ALT|GPIO_AF13|GPIO_PORTE|GPIO_PIN5)
|
#define GPIO_SAI1_SCK_A_2 (GPIO_ALT|GPIO_AF13|GPIO_PORTE|GPIO_PIN5)
|
||||||
|
#define GPIO_SAI1_SCK_A_3 (GPIO_ALT|GPIO_AF13|GPIO_PORTA|GPIO_PIN8)
|
||||||
|
#define GPIO_SAI1_SCK_A_4 (GPIO_ALT|GPIO_AF13|GPIO_PORTB|GPIO_PIN13)
|
||||||
#define GPIO_SAI1_SD_A_1 (GPIO_ALT|GPIO_AF13|GPIO_PORTC|GPIO_PIN3)
|
#define GPIO_SAI1_SD_A_1 (GPIO_ALT|GPIO_AF13|GPIO_PORTC|GPIO_PIN3)
|
||||||
#define GPIO_SAI1_SD_A_2 (GPIO_ALT|GPIO_AF13|GPIO_PORTD|GPIO_PIN6)
|
#define GPIO_SAI1_SD_A_2 (GPIO_ALT|GPIO_AF13|GPIO_PORTD|GPIO_PIN6)
|
||||||
#define GPIO_SAI1_SD_A_3 (GPIO_ALT|GPIO_AF13|GPIO_PORTE|GPIO_PIN6)
|
#define GPIO_SAI1_SD_A_3 (GPIO_ALT|GPIO_AF13|GPIO_PORTE|GPIO_PIN6)
|
||||||
|
#define GPIO_SAI1_SD_A_4 (GPIO_ALT|GPIO_AF13|GPIO_PORTA|GPIO_PIN10)
|
||||||
|
#define GPIO_SAI1_SD_A_5 (GPIO_ALT|GPIO_AF13|GPIO_PORTB|GPIO_PIN15)
|
||||||
#define GPIO_SAI1_MCLK_A_1 (GPIO_ALT|GPIO_AF13|GPIO_PORTB|GPIO_PIN8)
|
#define GPIO_SAI1_MCLK_A_1 (GPIO_ALT|GPIO_AF13|GPIO_PORTB|GPIO_PIN8)
|
||||||
#define GPIO_SAI1_MCLK_A_2 (GPIO_ALT|GPIO_AF13|GPIO_PORTE|GPIO_PIN2)
|
#define GPIO_SAI1_MCLK_A_2 (GPIO_ALT|GPIO_AF13|GPIO_PORTE|GPIO_PIN2)
|
||||||
|
#define GPIO_SAI1_MCLK_A_3 (GPIO_ALT|GPIO_AF13|GPIO_PORTA|GPIO_PIN3)
|
||||||
|
#define GPIO_SAI1_MCLK_A_4 (GPIO_ALT|GPIO_AF13|GPIO_PORTB|GPIO_PIN14)
|
||||||
|
|
||||||
#define GPIO_SAI1_FS_B_1 (GPIO_ALT|GPIO_AF13|GPIO_PORTA|GPIO_PIN4)
|
#define GPIO_SAI1_FS_B_1 (GPIO_ALT|GPIO_AF13|GPIO_PORTA|GPIO_PIN4)
|
||||||
#define GPIO_SAI1_FS_B_2 (GPIO_ALT|GPIO_AF13|GPIO_PORTB|GPIO_PIN6)
|
#define GPIO_SAI1_FS_B_2 (GPIO_ALT|GPIO_AF13|GPIO_PORTB|GPIO_PIN6)
|
||||||
#define GPIO_SAI1_FS_B_3 (GPIO_ALT|GPIO_AF13|GPIO_PORTE|GPIO_PIN9)
|
#define GPIO_SAI1_FS_B_3 (GPIO_ALT|GPIO_AF13|GPIO_PORTE|GPIO_PIN9)
|
||||||
|
#define GPIO_SAI1_FS_B_4 (GPIO_ALT|GPIO_AF13|GPIO_PORTA|GPIO_PIN14)
|
||||||
#define GPIO_SAI1_SCK_B_1 (GPIO_ALT|GPIO_AF13|GPIO_PORTB|GPIO_PIN3)
|
#define GPIO_SAI1_SCK_B_1 (GPIO_ALT|GPIO_AF13|GPIO_PORTB|GPIO_PIN3)
|
||||||
#define GPIO_SAI1_SCK_B_2 (GPIO_ALT|GPIO_AF13|GPIO_PORTE|GPIO_PIN8)
|
#define GPIO_SAI1_SCK_B_2 (GPIO_ALT|GPIO_AF13|GPIO_PORTE|GPIO_PIN8)
|
||||||
#define GPIO_SAI1_SD_B_1 (GPIO_ALT|GPIO_AF13|GPIO_PORTB|GPIO_PIN5)
|
#define GPIO_SAI1_SD_B_1 (GPIO_ALT|GPIO_AF13|GPIO_PORTB|GPIO_PIN5)
|
||||||
#define GPIO_SAI1_SD_B_2 (GPIO_ALT|GPIO_AF13|GPIO_PORTE|GPIO_PIN3)
|
#define GPIO_SAI1_SD_B_2 (GPIO_ALT|GPIO_AF13|GPIO_PORTE|GPIO_PIN3)
|
||||||
#define GPIO_SAI1_SD_B_3 (GPIO_ALT|GPIO_AF13|GPIO_PORTE|GPIO_PIN7)
|
#define GPIO_SAI1_SD_B_3 (GPIO_ALT|GPIO_AF13|GPIO_PORTE|GPIO_PIN7)
|
||||||
|
#define GPIO_SAI1_SD_B_4 (GPIO_ALT|GPIO_AF13|GPIO_PORTA|GPIO_PIN13)
|
||||||
#define GPIO_SAI1_MCLK_B_1 (GPIO_ALT|GPIO_AF13|GPIO_PORTB|GPIO_PIN4)
|
#define GPIO_SAI1_MCLK_B_1 (GPIO_ALT|GPIO_AF13|GPIO_PORTB|GPIO_PIN4)
|
||||||
#define GPIO_SAI1_MCLK_B_2 (GPIO_ALT|GPIO_AF13|GPIO_PORTE|GPIO_PIN10)
|
#define GPIO_SAI1_MCLK_B_2 (GPIO_ALT|GPIO_AF13|GPIO_PORTE|GPIO_PIN10)
|
||||||
|
|
||||||
@@ -263,10 +261,14 @@
|
|||||||
|
|
||||||
/* Single Wire Protocol Interface */
|
/* Single Wire Protocol Interface */
|
||||||
|
|
||||||
#define GPIO_SWPMI1_IO (GPIO_ALT|GPIO_AF12|GPIO_PORTB|GPIO_PIN12)
|
#define GPIO_SWPMI1_IO_1 (GPIO_ALT|GPIO_AF12|GPIO_PORTA|GPIO_PIN8)
|
||||||
#define GPIO_SWPMI1_TX (GPIO_ALT|GPIO_AF12|GPIO_PORTB|GPIO_PIN13)
|
#define GPIO_SWPMI1_IO_2 (GPIO_ALT|GPIO_AF12|GPIO_PORTB|GPIO_PIN12)
|
||||||
#define GPIO_SWPMI1_RX (GPIO_ALT|GPIO_AF12|GPIO_PORTB|GPIO_PIN14)
|
#define GPIO_SWPMI1_TX_1 (GPIO_ALT|GPIO_AF12|GPIO_PORTA|GPIO_PIN13)
|
||||||
#define GPIO_SWPMI1_SUSPEND (GPIO_ALT|GPIO_AF12|GPIO_PORTB|GPIO_PIN15)
|
#define GPIO_SWPMI1_TX_2 (GPIO_ALT|GPIO_AF12|GPIO_PORTB|GPIO_PIN13)
|
||||||
|
#define GPIO_SWPMI1_RX_1 (GPIO_ALT|GPIO_AF12|GPIO_PORTA|GPIO_PIN14)
|
||||||
|
#define GPIO_SWPMI1_RX_2 (GPIO_ALT|GPIO_AF12|GPIO_PORTB|GPIO_PIN14)
|
||||||
|
#define GPIO_SWPMI1_SUSPEND_1 (GPIO_ALT|GPIO_AF12|GPIO_PORTA|GPIO_PIN15)
|
||||||
|
#define GPIO_SWPMI1_SUSPEND_2 (GPIO_ALT|GPIO_AF12|GPIO_PORTB|GPIO_PIN15)
|
||||||
|
|
||||||
/* SPI */
|
/* SPI */
|
||||||
|
|
||||||
@@ -430,6 +432,7 @@
|
|||||||
#define GPIO_LPTIM1_IN2_2 (GPIO_ALT|GPIO_AF1 |GPIO_PORTC|GPIO_PIN2)
|
#define GPIO_LPTIM1_IN2_2 (GPIO_ALT|GPIO_AF1 |GPIO_PORTC|GPIO_PIN2)
|
||||||
#define GPIO_LPTIM1_OUT_1 (GPIO_ALT|GPIO_AF1 |GPIO_PORTB|GPIO_PIN2)
|
#define GPIO_LPTIM1_OUT_1 (GPIO_ALT|GPIO_AF1 |GPIO_PORTB|GPIO_PIN2)
|
||||||
#define GPIO_LPTIM1_OUT_2 (GPIO_ALT|GPIO_AF1 |GPIO_PORTC|GPIO_PIN1)
|
#define GPIO_LPTIM1_OUT_2 (GPIO_ALT|GPIO_AF1 |GPIO_PORTC|GPIO_PIN1)
|
||||||
|
#define GPIO_LPTIM1_OUT_3 (GPIO_ALT|GPIO_AF1 |GPIO_PORTA|GPIO_PIN14)
|
||||||
#define GPIO_LPTIM1_ETR_1 (GPIO_ALT|GPIO_AF1 |GPIO_PORTB|GPIO_PIN6)
|
#define GPIO_LPTIM1_ETR_1 (GPIO_ALT|GPIO_AF1 |GPIO_PORTB|GPIO_PIN6)
|
||||||
#define GPIO_LPTIM1_ETR_2 (GPIO_ALT|GPIO_AF1 |GPIO_PORTC|GPIO_PIN3)
|
#define GPIO_LPTIM1_ETR_2 (GPIO_ALT|GPIO_AF1 |GPIO_PORTC|GPIO_PIN3)
|
||||||
|
|
||||||
@@ -445,7 +448,8 @@
|
|||||||
|
|
||||||
/* Touch Screen Controller */
|
/* Touch Screen Controller */
|
||||||
|
|
||||||
#define GPIO_TSC_SYNC (GPIO_ALT|GPIO_AF9 |GPIO_PORTD|GPIO_PIN2)
|
#define GPIO_TSC_SYNC_1 (GPIO_ALT|GPIO_AF9 |GPIO_PORTB|GPIO_PIN10)
|
||||||
|
#define GPIO_TSC_SYNC_2 (GPIO_ALT|GPIO_AF9 |GPIO_PORTD|GPIO_PIN2)
|
||||||
|
|
||||||
#define GPIO_TSC_G1_IO1 (GPIO_ALT|GPIO_AF9 |GPIO_PORTB|GPIO_PIN12)
|
#define GPIO_TSC_G1_IO1 (GPIO_ALT|GPIO_AF9 |GPIO_PORTB|GPIO_PIN12)
|
||||||
#define GPIO_TSC_G1_IO2 (GPIO_ALT|GPIO_AF9 |GPIO_PORTB|GPIO_PIN13)
|
#define GPIO_TSC_G1_IO2 (GPIO_ALT|GPIO_AF9 |GPIO_PORTB|GPIO_PIN13)
|
||||||
@@ -541,24 +545,12 @@
|
|||||||
#define GPIO_USART3_RTS_DE_4 (GPIO_ALT|GPIO_AF7 |GPIO_PORTD|GPIO_PIN2)
|
#define GPIO_USART3_RTS_DE_4 (GPIO_ALT|GPIO_AF7 |GPIO_PORTD|GPIO_PIN2)
|
||||||
#define GPIO_USART3_RTS_DE_5 (GPIO_ALT|GPIO_AF7 |GPIO_PORTD|GPIO_PIN12)
|
#define GPIO_USART3_RTS_DE_5 (GPIO_ALT|GPIO_AF7 |GPIO_PORTD|GPIO_PIN12)
|
||||||
|
|
||||||
#define GPIO_UART4_TX_1 (GPIO_ALT|GPIO_AF8 |GPIO_PORTA|GPIO_PIN0)
|
|
||||||
#define GPIO_UART4_TX_2 (GPIO_ALT|GPIO_AF8 |GPIO_PORTC|GPIO_PIN10)
|
|
||||||
#define GPIO_UART4_RX_1 (GPIO_ALT|GPIO_AF8 |GPIO_PORTA|GPIO_PIN1)
|
|
||||||
#define GPIO_UART4_RX_2 (GPIO_ALT|GPIO_AF8 |GPIO_PORTC|GPIO_PIN11)
|
|
||||||
#define GPIO_UART4_CTS (GPIO_ALT|GPIO_AF8 |GPIO_PORTB|GPIO_PIN7)
|
|
||||||
#define GPIO_UART4_RTS_DE (GPIO_ALT|GPIO_AF8 |GPIO_PORTA|GPIO_PIN15)
|
|
||||||
|
|
||||||
#define GPIO_UART5_TX (GPIO_ALT|GPIO_AF8 |GPIO_PORTC|GPIO_PIN12)
|
|
||||||
#define GPIO_UART5_RX (GPIO_ALT|GPIO_AF8 |GPIO_PORTD|GPIO_PIN2)
|
|
||||||
#define GPIO_UART5_CTS (GPIO_ALT|GPIO_AF8 |GPIO_PORTB|GPIO_PIN5)
|
|
||||||
#define GPIO_UART5_RTS_DE (GPIO_ALT|GPIO_AF8 |GPIO_PORTB|GPIO_PIN4)
|
|
||||||
|
|
||||||
#define GPIO_LPUART1_TX_1 (GPIO_ALT|GPIO_AF8 |GPIO_PORTA|GPIO_PIN2)
|
#define GPIO_LPUART1_TX_1 (GPIO_ALT|GPIO_AF8 |GPIO_PORTA|GPIO_PIN2)
|
||||||
#define GPIO_LPUART1_TX_2 (GPIO_ALT|GPIO_AF8 |GPIO_PORTB|GPIO_PIN11)
|
#define GPIO_LPUART1_TX_2 (GPIO_ALT|GPIO_AF8 |GPIO_PORTB|GPIO_PIN11)
|
||||||
#define GPIO_LPUART1_TX_3 (GPIO_ALT|GPIO_AF8 |GPIO_PORTC|GPIO_PIN0)
|
#define GPIO_LPUART1_TX_3 (GPIO_ALT|GPIO_AF8 |GPIO_PORTC|GPIO_PIN1)
|
||||||
#define GPIO_LPUART1_RX_1 (GPIO_ALT|GPIO_AF8 |GPIO_PORTA|GPIO_PIN3)
|
#define GPIO_LPUART1_RX_1 (GPIO_ALT|GPIO_AF8 |GPIO_PORTA|GPIO_PIN3)
|
||||||
#define GPIO_LPUART1_RX_2 (GPIO_ALT|GPIO_AF8 |GPIO_PORTB|GPIO_PIN10)
|
#define GPIO_LPUART1_RX_2 (GPIO_ALT|GPIO_AF8 |GPIO_PORTB|GPIO_PIN10)
|
||||||
#define GPIO_LPUART1_RX_3 (GPIO_ALT|GPIO_AF8 |GPIO_PORTC|GPIO_PIN1)
|
#define GPIO_LPUART1_RX_3 (GPIO_ALT|GPIO_AF8 |GPIO_PORTC|GPIO_PIN0)
|
||||||
#define GPIO_LPUART1_CTS_1 (GPIO_ALT|GPIO_AF8 |GPIO_PORTA|GPIO_PIN6)
|
#define GPIO_LPUART1_CTS_1 (GPIO_ALT|GPIO_AF8 |GPIO_PORTA|GPIO_PIN6)
|
||||||
#define GPIO_LPUART1_CTS_2 (GPIO_ALT|GPIO_AF8 |GPIO_PORTB|GPIO_PIN13)
|
#define GPIO_LPUART1_CTS_2 (GPIO_ALT|GPIO_AF8 |GPIO_PORTB|GPIO_PIN13)
|
||||||
#define GPIO_LPUART1_RTS_DE_1 (GPIO_ALT|GPIO_AF8 |GPIO_PORTB|GPIO_PIN1)
|
#define GPIO_LPUART1_RTS_DE_1 (GPIO_ALT|GPIO_AF8 |GPIO_PORTB|GPIO_PIN1)
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#if defined(CONFIG_STM32L4_STM32L4X3)
|
#if defined(CONFIG_STM32L4_STM32L4X2) || defined(CONFIG_STM32L4_STM32L4X3)
|
||||||
|
|
||||||
/****************************************************************************************************
|
/****************************************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
|
|
||||||
#if defined(CONFIG_STM32L4_STM32L4X3)
|
#if defined(CONFIG_STM32L4_STM32L4X2) || defined(CONFIG_STM32L4_STM32L4X3)
|
||||||
|
|
||||||
/****************************************************************************************************
|
/****************************************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
|
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
|
|
||||||
#if defined(CONFIG_STM32L4_STM32L4X3)
|
#if defined(CONFIG_STM32L4_STM32L4X2) || defined(CONFIG_STM32L4_STM32L4X3)
|
||||||
# include "chip/stm32l4x3xx_dbgmcu.h"
|
# include "chip/stm32l4x3xx_dbgmcu.h"
|
||||||
#elif defined(CONFIG_STM32L4_STM32L4X5)
|
#elif defined(CONFIG_STM32L4_STM32L4X5)
|
||||||
# include "chip/stm32l4x5xx_dbgmcu.h"
|
# include "chip/stm32l4x5xx_dbgmcu.h"
|
||||||
|
|||||||
@@ -49,8 +49,8 @@
|
|||||||
* TODO: do we need separate implementation for STM32L4X3?
|
* TODO: do we need separate implementation for STM32L4X3?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_STM32L4_STM32L4X3) || defined(CONFIG_STM32L4_STM32L4X5) || \
|
#if defined(CONFIG_STM32L4_STM32L4X2) || defined(CONFIG_STM32L4_STM32L4X3) || \
|
||||||
defined(CONFIG_STM32L4_STM32L4X6)
|
defined(CONFIG_STM32L4_STM32L4X5) || defined(CONFIG_STM32L4_STM32L4X6)
|
||||||
#include "stm32l4x6xx_dma.c"
|
#include "stm32l4x6xx_dma.c"
|
||||||
#else
|
#else
|
||||||
# error "Unsupported STM32L4 chip"
|
# error "Unsupported STM32L4 chip"
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
/* Include the correct DMA register definitions for this STM32 family */
|
/* Include the correct DMA register definitions for this STM32 family */
|
||||||
|
|
||||||
#if defined(CONFIG_STM32L4_STM32L4X3)
|
#if defined(CONFIG_STM32L4_STM32L4X2) || defined(CONFIG_STM32L4_STM32L4X3)
|
||||||
# include "chip/stm32l4x3xx_dma.h"
|
# include "chip/stm32l4x3xx_dma.h"
|
||||||
#elif defined(CONFIG_STM32L4_STM32L4X5)
|
#elif defined(CONFIG_STM32L4_STM32L4X5)
|
||||||
# include "chip/stm32l4x5xx_dma.h"
|
# include "chip/stm32l4x5xx_dma.h"
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
/* Include the correct firewall register definitions for this STM32L4 family */
|
/* Include the correct firewall register definitions for this STM32L4 family */
|
||||||
|
|
||||||
#if defined(CONFIG_STM32L4_STM32L4X3)
|
#if defined(CONFIG_STM32L4_STM32L4X2) || defined(CONFIG_STM32L4_STM32L4X3)
|
||||||
# include "chip/stm32l4x3xx_firewall.h"
|
# include "chip/stm32l4x3xx_firewall.h"
|
||||||
#elif defined(CONFIG_STM32L4_STM32L4X5)
|
#elif defined(CONFIG_STM32L4_STM32L4X5)
|
||||||
# include "chip/stm32l4x5xx_firewall.h"
|
# include "chip/stm32l4x5xx_firewall.h"
|
||||||
|
|||||||
@@ -63,8 +63,8 @@
|
|||||||
|
|
||||||
#include "up_arch.h"
|
#include "up_arch.h"
|
||||||
|
|
||||||
#if !(defined(CONFIG_STM32L4_STM32L4X3) || defined(CONFIG_STM32L4_STM32L4X5) || \
|
#if !(defined(CONFIG_STM32L4_STM32L4X2) || defined(CONFIG_STM32L4_STM32L4X3) || \
|
||||||
defined(CONFIG_STM32L4_STM32L4X6))
|
defined(CONFIG_STM32L4_STM32L4X5) || defined(CONFIG_STM32L4_STM32L4X6))
|
||||||
# error "Unrecognized STM32 chip"
|
# error "Unrecognized STM32 chip"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -54,8 +54,8 @@
|
|||||||
|
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
|
|
||||||
#if defined(CONFIG_STM32L4_STM32L4X3) || defined(CONFIG_STM32L4_STM32L4X5) || \
|
#if defined(CONFIG_STM32L4_STM32L4X2) || defined(CONFIG_STM32L4_STM32L4X3) || \
|
||||||
defined(CONFIG_STM32L4_STM32L4X6)
|
defined(CONFIG_STM32L4_STM32L4X5) || defined(CONFIG_STM32L4_STM32L4X6)
|
||||||
# include "chip/stm32l4_gpio.h"
|
# include "chip/stm32l4_gpio.h"
|
||||||
#else
|
#else
|
||||||
# error "Unsupported STM32L4 chip"
|
# error "Unsupported STM32L4 chip"
|
||||||
|
|||||||
@@ -79,7 +79,7 @@
|
|||||||
|
|
||||||
/* Include chip-specific clocking initialization logic */
|
/* Include chip-specific clocking initialization logic */
|
||||||
|
|
||||||
#if defined(CONFIG_STM32L4_STM32L4X3)
|
#if defined(CONFIG_STM32L4_STM32L4X2) || defined(CONFIG_STM32L4_STM32L4X3)
|
||||||
# include "stm32l4x3xx_rcc.c"
|
# include "stm32l4x3xx_rcc.c"
|
||||||
#elif defined(CONFIG_STM32L4_STM32L4X5)
|
#elif defined(CONFIG_STM32L4_STM32L4X5)
|
||||||
# include "stm32l4x5xx_rcc.c"
|
# include "stm32l4x5xx_rcc.c"
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
#include "up_arch.h"
|
#include "up_arch.h"
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
|
|
||||||
#if defined(CONFIG_STM32L4_STM32L4X3)
|
#if defined(CONFIG_STM32L4_STM32L4X2) || defined(CONFIG_STM32L4_STM32L4X3)
|
||||||
# include "chip/stm32l4x3xx_rcc.h"
|
# include "chip/stm32l4x3xx_rcc.h"
|
||||||
#elif defined(CONFIG_STM32L4_STM32L4X5)
|
#elif defined(CONFIG_STM32L4_STM32L4X5)
|
||||||
# include "chip/stm32l4x5xx_rcc.h"
|
# include "chip/stm32l4x5xx_rcc.h"
|
||||||
|
|||||||
@@ -45,8 +45,8 @@
|
|||||||
|
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
|
|
||||||
#if defined(CONFIG_STM32L4_STM32L4X3) || defined(CONFIG_STM32L4_STM32L4X5) || \
|
#if defined(CONFIG_STM32L4_STM32L4X2) || defined(CONFIG_STM32L4_STM32L4X3) || \
|
||||||
defined(CONFIG_STM32L4_STM32L4X6)
|
defined(CONFIG_STM32L4_STM32L4X5) || defined(CONFIG_STM32L4_STM32L4X6)
|
||||||
# include "chip/stm32l4_uart.h"
|
# include "chip/stm32l4_uart.h"
|
||||||
#else
|
#else
|
||||||
# error "Unsupported STM32L4 chip"
|
# error "Unsupported STM32L4 chip"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ NucleoL432KC:
|
|||||||
|
|
||||||
Microprocessor: 32-bit ARM Cortex M4 at 80MHz STM32L432KCU6
|
Microprocessor: 32-bit ARM Cortex M4 at 80MHz STM32L432KCU6
|
||||||
Memory: 256 KB Flash and 64 KB SRAM
|
Memory: 256 KB Flash and 64 KB SRAM
|
||||||
ADC: 2×12-bit, 2.4 MSPS A/D converter: up to 24 channels
|
ADC: 1×12-bit, 5 MSPS A/D converter: up to 10 channels
|
||||||
DMA: 16-stream DMA controllers with FIFOs and burst support
|
DMA: 16-stream DMA controllers with FIFOs and burst support
|
||||||
Timers: Up to 11 timers: up to five 16-bit, one 32-bit, two low-power
|
Timers: Up to 11 timers: up to five 16-bit, one 32-bit, two low-power
|
||||||
16 bit timers, two watchdog timers, and a SysTick timer
|
16 bit timers, two watchdog timers, and a SysTick timer
|
||||||
@@ -28,7 +28,7 @@ NucleoL432KC:
|
|||||||
|
|
||||||
Board features:
|
Board features:
|
||||||
|
|
||||||
Peripherals: 1 led, 1 push button
|
Peripherals: 1 led
|
||||||
Debug: Serial wire debug and JTAG interfaces via on-board micro-usb stlink v2.1
|
Debug: Serial wire debug and JTAG interfaces via on-board micro-usb stlink v2.1
|
||||||
Expansion I/F Arduino Nano Headers
|
Expansion I/F Arduino Nano Headers
|
||||||
|
|
||||||
@@ -311,14 +311,9 @@ mbed
|
|||||||
Hardware
|
Hardware
|
||||||
========
|
========
|
||||||
|
|
||||||
Buttons
|
|
||||||
-------
|
|
||||||
B1 USER: the user button is connected to the I/O PC13 (pin 2) of the STM32
|
|
||||||
microcontroller.
|
|
||||||
|
|
||||||
LEDs
|
LEDs
|
||||||
----
|
----
|
||||||
The Nucleo L432KC provides a single user LED, LD2. LD2
|
The Nucleo L432KC provides a single user LED, LD3. LD3
|
||||||
is the green LED connected to Arduino signal D13 corresponding to MCU I/O
|
is the green LED connected to Arduino signal D13 corresponding to MCU I/O
|
||||||
PB3 (pin 26).
|
PB3 (pin 26).
|
||||||
|
|
||||||
@@ -328,9 +323,9 @@ Hardware
|
|||||||
These LEDs are not used by the board port unless CONFIG_ARCH_LEDS is
|
These LEDs are not used by the board port unless CONFIG_ARCH_LEDS is
|
||||||
defined. In that case, the usage by the board port is defined in
|
defined. In that case, the usage by the board port is defined in
|
||||||
include/board.h and src/sam_leds.c. The LEDs are used to encode OS-related
|
include/board.h and src/sam_leds.c. The LEDs are used to encode OS-related
|
||||||
events as follows when the red LED (PE24) is available:
|
events as follows when the LED is available:
|
||||||
|
|
||||||
SYMBOL Meaning LD2
|
SYMBOL Meaning LD3
|
||||||
------------------- ----------------------- -----------
|
------------------- ----------------------- -----------
|
||||||
LED_STARTED NuttX has been started OFF
|
LED_STARTED NuttX has been started OFF
|
||||||
LED_HEAPALLOCATE Heap has been allocated OFF
|
LED_HEAPALLOCATE Heap has been allocated OFF
|
||||||
@@ -342,8 +337,8 @@ Hardware
|
|||||||
LED_PANIC The system has crashed Blinking
|
LED_PANIC The system has crashed Blinking
|
||||||
LED_IDLE MCU is is sleep mode Not used
|
LED_IDLE MCU is is sleep mode Not used
|
||||||
|
|
||||||
Thus if LD2, NuttX has successfully booted and is, apparently, running
|
Thus if LD3, NuttX has successfully booted and is, apparently, running
|
||||||
normally. If LD2 is flashing at approximately 2Hz, then a fatal error
|
normally. If LD3 is flashing at approximately 2Hz, then a fatal error
|
||||||
has been detected and the system has halted.
|
has been detected and the system has halted.
|
||||||
|
|
||||||
Serial Consoles
|
Serial Consoles
|
||||||
|
|||||||
@@ -66,8 +66,6 @@
|
|||||||
|
|
||||||
/* Values defined in arch/arm/src/stm32l4/chip/stm32l4x3xx_dma.h */
|
/* Values defined in arch/arm/src/stm32l4/chip/stm32l4x3xx_dma.h */
|
||||||
|
|
||||||
#define DMACHAN_SDMMC DMACHAN_SDMMC_1 /* 2 choices */
|
|
||||||
|
|
||||||
#define DMACHAN_SPI1_RX DMACHAN_SPI1_RX_1 /* 2 choices */
|
#define DMACHAN_SPI1_RX DMACHAN_SPI1_RX_1 /* 2 choices */
|
||||||
#define DMACHAN_SPI1_TX DMACHAN_SPI1_TX_1 /* 2 choices */
|
#define DMACHAN_SPI1_TX DMACHAN_SPI1_TX_1 /* 2 choices */
|
||||||
|
|
||||||
@@ -104,22 +102,28 @@
|
|||||||
#define GPIO_USART2_CTS GPIO_USART2_CTS_2
|
#define GPIO_USART2_CTS GPIO_USART2_CTS_2
|
||||||
|
|
||||||
/* I2C
|
/* I2C
|
||||||
|
*
|
||||||
|
* On Arduino the I2C bus is available at positions A4 and A5. On the
|
||||||
|
* nulceo-1432kc board the I2C bus pins (PB6 and PB7) are connected to
|
||||||
|
* pins A4 and A5 through the SB16 and SB18 solder bridges. In this case
|
||||||
|
* the pins PA5 and PA6 must be configured as input floating.
|
||||||
*
|
*
|
||||||
* The optional _GPIO configurations allow the I2C driver to manually
|
* The optional _GPIO configurations allow the I2C driver to manually
|
||||||
* reset the bus to clear stuck slaves. They match the pin configuration,
|
* reset the bus to clear stuck slaves. They match the pin configuration,
|
||||||
* but are normally-high GPIOs.
|
* but are normally-high GPIOs.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define GPIO_I2C1_SCL \
|
#define GPIO_I2C1_SCL \
|
||||||
(GPIO_I2C1_SCL_2 | GPIO_OPENDRAIN | GPIO_SPEED_50MHz | GPIO_OUTPUT_SET)
|
(GPIO_I2C1_SCL_1 | GPIO_OPENDRAIN | GPIO_SPEED_50MHz | GPIO_OUTPUT_SET)
|
||||||
#define GPIO_I2C1_SDA \
|
#define GPIO_I2C1_SDA \
|
||||||
(GPIO_I2C1_SDA_2 | GPIO_OPENDRAIN | GPIO_SPEED_50MHz | GPIO_OUTPUT_SET)
|
(GPIO_I2C1_SDA_1 | GPIO_OPENDRAIN | GPIO_SPEED_50MHz | GPIO_OUTPUT_SET)
|
||||||
#define GPIO_I2C1_SCL_GPIO \
|
#define GPIO_I2C1_SCL_GPIO \
|
||||||
(GPIO_OUTPUT | GPIO_OPENDRAIN | GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | \
|
(GPIO_OUTPUT | GPIO_OPENDRAIN | GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | \
|
||||||
GPIO_PORTB | GPIO_PIN8)
|
GPIO_PORTB | GPIO_PIN6)
|
||||||
#define GPIO_I2C1_SDA_GPIO \
|
#define GPIO_I2C1_SDA_GPIO \
|
||||||
(GPIO_OUTPUT | GPIO_OPENDRAIN | GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | \
|
(GPIO_OUTPUT | GPIO_OPENDRAIN | GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | \
|
||||||
GPIO_PORTB | GPIO_PIN9)
|
GPIO_PORTB | GPIO_PIN7)
|
||||||
|
|
||||||
#define GPIO_I2C2_SCL \
|
#define GPIO_I2C2_SCL \
|
||||||
(GPIO_I2C2_SCL_1 | GPIO_OPENDRAIN | GPIO_SPEED_50MHz | GPIO_OUTPUT_SET)
|
(GPIO_I2C2_SCL_1 | GPIO_OPENDRAIN | GPIO_SPEED_50MHz | GPIO_OUTPUT_SET)
|
||||||
@@ -146,7 +150,7 @@
|
|||||||
|
|
||||||
/* LEDs
|
/* LEDs
|
||||||
*
|
*
|
||||||
* The Nucleo l432kc board provides a single user LED, LD2. LD2
|
* The Nucleo l432kc board provides a single user LED, LD2. LD3
|
||||||
* is the green LED connected to Arduino signal D13 corresponding to
|
* is the green LED connected to Arduino signal D13 corresponding to
|
||||||
* MCU I/O PB3 (pin 26).
|
* MCU I/O PB3 (pin 26).
|
||||||
*
|
*
|
||||||
@@ -156,19 +160,19 @@
|
|||||||
|
|
||||||
/* LED index values for use with board_userled() */
|
/* LED index values for use with board_userled() */
|
||||||
|
|
||||||
#define BOARD_LD2 0
|
#define BOARD_LD3 0
|
||||||
#define BOARD_NLEDS 1
|
#define BOARD_NLEDS 1
|
||||||
|
|
||||||
/* LED bits for use with board_userled_all() */
|
/* LED bits for use with board_userled_all() */
|
||||||
|
|
||||||
#define BOARD_LD2_BIT (1 << BOARD_LD2)
|
#define BOARD_LD3_BIT (1 << BOARD_LD3)
|
||||||
|
|
||||||
/* These LEDs are not used by the board port unless CONFIG_ARCH_LEDS is
|
/* These LEDs are not used by the board port unless CONFIG_ARCH_LEDS is
|
||||||
* defined. In that case, the usage by the board port is defined in
|
* defined. In that case, the usage by the board port is defined in
|
||||||
* include/board.h and src/sam_leds.c. The LEDs are used to encode OS-related
|
* include/board.h and src/sam_leds.c. The LEDs are used to encode OS-related
|
||||||
* events as follows when the red LED (PE24) is available:
|
* events as follows when the red LED (PE24) is available:
|
||||||
*
|
*
|
||||||
* SYMBOL Meaning LD2
|
* SYMBOL Meaning LD3
|
||||||
* ------------------- ----------------------- -----------
|
* ------------------- ----------------------- -----------
|
||||||
* LED_STARTED NuttX has been started OFF
|
* LED_STARTED NuttX has been started OFF
|
||||||
* LED_HEAPALLOCATE Heap has been allocated OFF
|
* LED_HEAPALLOCATE Heap has been allocated OFF
|
||||||
@@ -180,8 +184,8 @@
|
|||||||
* LED_PANIC The system has crashed Blinking
|
* LED_PANIC The system has crashed Blinking
|
||||||
* LED_IDLE MCU is is sleep mode Not used
|
* LED_IDLE MCU is is sleep mode Not used
|
||||||
*
|
*
|
||||||
* Thus if LD2, NuttX has successfully booted and is, apparently, running
|
* Thus if LD3 NuttX has successfully booted and is, apparently, running
|
||||||
* normally. If LD2 is flashing at approximately 2Hz, then a fatal error
|
* normally. If LD3 is flashing at approximately 2Hz, then a fatal error
|
||||||
* has been detected and the system has halted.
|
* has been detected and the system has halted.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -194,17 +198,6 @@
|
|||||||
#define LED_ASSERTION 2
|
#define LED_ASSERTION 2
|
||||||
#define LED_PANIC 1
|
#define LED_PANIC 1
|
||||||
|
|
||||||
/* Buttons
|
|
||||||
*
|
|
||||||
* B1 USER: the user button is connected to the I/O PC13 (pin 2) of the STM32
|
|
||||||
* microcontroller.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define BUTTON_USER 0
|
|
||||||
#define NUM_BUTTONS 1
|
|
||||||
|
|
||||||
#define BUTTON_USER_BIT (1 << BUTTON_USER)
|
|
||||||
|
|
||||||
/* Quadrature encoder
|
/* Quadrature encoder
|
||||||
* Default is to use timer 5 (32-bit) and encoder on PA0/PA1
|
* Default is to use timer 5 (32-bit) and encoder on PA0/PA1
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -76,7 +76,7 @@
|
|||||||
# undef HAVE_MMCSD
|
# undef HAVE_MMCSD
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* LED. User LD2: the green LED is a user LED connected to Arduino signal D13
|
/* LED. User LD3: the green LED is a user LED connected to Arduino signal D13
|
||||||
* corresponding to MCU I/O PB3 (pin 26)
|
* corresponding to MCU I/O PB3 (pin 26)
|
||||||
* target.
|
* target.
|
||||||
*
|
*
|
||||||
@@ -84,24 +84,11 @@
|
|||||||
* - When the I/O is LOW, the LED is off.
|
* - When the I/O is LOW, the LED is off.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define GPIO_LD2 \
|
#define GPIO_LD3 \
|
||||||
(GPIO_PORTB | GPIO_PIN3 | GPIO_OUTPUT_CLEAR | GPIO_OUTPUT | GPIO_PULLUP | \
|
(GPIO_PORTB | GPIO_PIN3 | GPIO_OUTPUT_CLEAR | GPIO_OUTPUT | GPIO_PULLUP | \
|
||||||
GPIO_SPEED_50MHz)
|
GPIO_SPEED_50MHz)
|
||||||
#define LED_DRIVER_PATH "/dev/userleds"
|
#define LED_DRIVER_PATH "/dev/userleds"
|
||||||
|
|
||||||
/* Buttons
|
|
||||||
*
|
|
||||||
* B1 USER: the user button is connected to the I/O PC13 (pin 2) of the STM32
|
|
||||||
* microcontroller.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define MIN_IRQBUTTON BUTTON_USER
|
|
||||||
#define MAX_IRQBUTTON BUTTON_USER
|
|
||||||
#define NUM_IRQBUTTONS 1
|
|
||||||
|
|
||||||
#define GPIO_BTN_USER \
|
|
||||||
(GPIO_INPUT |GPIO_FLOAT |GPIO_EXTI | GPIO_PORTC | GPIO_PIN13)
|
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Public Data
|
* Public Data
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ void board_autoled_initialize(void)
|
|||||||
{
|
{
|
||||||
/* Configure LD2 GPIO for output */
|
/* Configure LD2 GPIO for output */
|
||||||
|
|
||||||
stm32l4_configgpio(GPIO_LD2);
|
stm32l4_configgpio(GPIO_LD3);
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@@ -77,7 +77,7 @@ void board_autoled_on(int led)
|
|||||||
{
|
{
|
||||||
if (led == 1)
|
if (led == 1)
|
||||||
{
|
{
|
||||||
stm32l4_gpiowrite(GPIO_LD2, true);
|
stm32l4_gpiowrite(GPIO_LD3, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -89,7 +89,7 @@ void board_autoled_off(int led)
|
|||||||
{
|
{
|
||||||
if (led == 1)
|
if (led == 1)
|
||||||
{
|
{
|
||||||
stm32l4_gpiowrite(GPIO_LD2, false);
|
stm32l4_gpiowrite(GPIO_LD3, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user