请教下:CC2640R2F手册里面提到GPIO可以配置成下面的接口
– UART
– 2 个同步串行接口(SSI)(SPI、MICROWIRE 和
TI)
– I2C
– I2S
问题:
1. GPIO 可以任意配置成以上接口对吧;
2. 只能配置成2 个同步串行接口,有没有这些GPIO的配置表可以查?谢谢!
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
请教下:CC2640R2F手册里面提到GPIO可以配置成下面的接口
– UART
– 2 个同步串行接口(SSI)(SPI、MICROWIRE 和
TI)
– I2C
– I2S
问题:
1. GPIO 可以任意配置成以上接口对吧;
2. 只能配置成2 个同步串行接口,有没有这些GPIO的配置表可以查?谢谢!
未使用的GPIO可以任意配置,
SDK中CC2640R2_LAUNCHXL.h文件中对引脚做了分配
/* Defines */ #define CC2640R2_LAUNCHXL /* Mapping of pins to board signals using general board aliases * <board signal alias> <pin mapping> */ /* Analog Capable DIOs */ #define CC2640R2_LAUNCHXL_DIO23_ANALOG IOID_23 #define CC2640R2_LAUNCHXL_DIO24_ANALOG IOID_24 #define CC2640R2_LAUNCHXL_DIO25_ANALOG IOID_25 #define CC2640R2_LAUNCHXL_DIO26_ANALOG IOID_26 #define CC2640R2_LAUNCHXL_DIO27_ANALOG IOID_27 #define CC2640R2_LAUNCHXL_DIO28_ANALOG IOID_28 #define CC2640R2_LAUNCHXL_DIO29_ANALOG IOID_29 #define CC2640R2_LAUNCHXL_DIO30_ANALOG IOID_30 /* Digital IOs */ #define CC2640R2_LAUNCHXL_DIO0 IOID_0 #define CC2640R2_LAUNCHXL_DIO1_RFSW IOID_1 #define CC2640R2_LAUNCHXL_DIO12 IOID_12 #define CC2640R2_LAUNCHXL_DIO15 IOID_15 #define CC2640R2_LAUNCHXL_DIO16_TDO IOID_16 #define CC2640R2_LAUNCHXL_DIO17_TDI IOID_17 #define CC2640R2_LAUNCHXL_DIO21 IOID_21 #define CC2640R2_LAUNCHXL_DIO22 IOID_22 /* Discrete Inputs */ #define CC2640R2_LAUNCHXL_PIN_BTN1 IOID_13 #define CC2640R2_LAUNCHXL_PIN_BTN2 IOID_14 /* GPIO */ #define CC2640R2_LAUNCHXL_GPIO_LED_ON 1 #define CC2640R2_LAUNCHXL_GPIO_LED_OFF 0 /* I2C */ #define CC2640R2_LAUNCHXL_I2C0_SCL0 IOID_4 #define CC2640R2_LAUNCHXL_I2C0_SDA0 IOID_5 /* I2S */ #define CC2640R2_LAUNCHXL_I2S_ADO IOID_0 #define CC2640R2_LAUNCHXL_I2S_ADI IOID_1 #define CC2640R2_LAUNCHXL_I2S_BCLK IOID_30 #define CC2640R2_LAUNCHXL_I2S_MCLK PIN_UNASSIGNED #define CC2640R2_LAUNCHXL_I2S_WCLK IOID_29 /* LEDs */ #define CC2640R2_LAUNCHXL_PIN_LED_ON 1 #define CC2640R2_LAUNCHXL_PIN_LED_OFF 0 #define CC2640R2_LAUNCHXL_PIN_RLED IOID_6 #define CC2640R2_LAUNCHXL_PIN_GLED IOID_7 /* PWM Outputs */ #define CC2640R2_LAUNCHXL_PWMPIN0 CC2640R2_LAUNCHXL_PIN_RLED #define CC2640R2_LAUNCHXL_PWMPIN1 CC2640R2_LAUNCHXL_PIN_GLED #define CC2640R2_LAUNCHXL_PWMPIN2 PIN_UNASSIGNED #define CC2640R2_LAUNCHXL_PWMPIN3 PIN_UNASSIGNED #define CC2640R2_LAUNCHXL_PWMPIN4 PIN_UNASSIGNED #define CC2640R2_LAUNCHXL_PWMPIN5 PIN_UNASSIGNED #define CC2640R2_LAUNCHXL_PWMPIN6 PIN_UNASSIGNED #define CC2640R2_LAUNCHXL_PWMPIN7 PIN_UNASSIGNED /* SPI */ #define CC2640R2_LAUNCHXL_SPI_FLASH_CS IOID_20 #define CC2640R2_LAUNCHXL_FLASH_CS_ON 0 #define CC2640R2_LAUNCHXL_FLASH_CS_OFF 1 /* SPI Board */ #define CC2640R2_LAUNCHXL_SPI0_MISO IOID_8 /* RF1.20 */ #define CC2640R2_LAUNCHXL_SPI0_MOSI IOID_9 /* RF1.18 */ #define CC2640R2_LAUNCHXL_SPI0_CLK IOID_10 /* RF1.16 */ #define CC2640R2_LAUNCHXL_SPI0_CSN IOID_11 #define CC2640R2_LAUNCHXL_SPI1_MISO PIN_UNASSIGNED #define CC2640R2_LAUNCHXL_SPI1_MOSI PIN_UNASSIGNED #define CC2640R2_LAUNCHXL_SPI1_CLK PIN_UNASSIGNED #define CC2640R2_LAUNCHXL_SPI1_CSN PIN_UNASSIGNED /* UART Board */ #define CC2640R2_LAUNCHXL_UART_RX IOID_2 /* RXD */ #define CC2640R2_LAUNCHXL_UART_TX IOID_3 /* TXD */ #define CC2640R2_LAUNCHXL_UART_CTS IOID_19 /* CTS */ #define CC2640R2_LAUNCHXL_UART_RTS IOID_18 /* RTS */