斑竹,请看一下代码, 这个测试程序,usart3 工作,uart 4 不工作。
#elif defined USE_STM3210C_EVAL
#define GPIOx GPIOC //GPIOC used for UATR4
#define RCC_APB2Periph_GPIOx RCC_APB2Periph_GPIOC
#define GPIO_TxPin GPIO_Pin_10
#define GPIO_RxPin GPIO_Pin_11
//#define GPIOx GPIOD //GPIOD used for USART3
//#define RCC_APB2Periph_GPIOx RCC_APB2Periph_GPIOD
//#define GPIO_TxPin GPIO_Pin_8
//#define GPIO_RxPin GPIO_Pin_9
#endif /* USE_STM3210B_EVAL */
void RCC_Configuration(void)
{
/* Setup the microcontroller system. Initialize the Embedded Flash Interface,
initialize the PLL and update the SystemFrequency variable. */
SystemInit();