CH32V208串口重映射問題

CH32V208串口3部分映射到PC10、PC11后無輸出,請問是什么原因?開發(fā)板是CH32F&V208W-R0-1v4, PC10一直低電平,代碼如下:

????GPIO_InitTypeDef??GPIO_InitStructure?=?{0};
????USART_InitTypeDef?USART_InitStructure?=?{0};

????RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART3,?ENABLE);
????RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC?|?RCC_APB2Periph_GPIOB,?ENABLE);
????RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO,?ENABLE);

????GPIO_PinRemapConfig(GPIO_PartialRemap_USART3,?ENABLE);

????/*?UART3?TX-->C.10???RX-->C.11?*/
????GPIO_InitStructure.GPIO_Pin?=?GPIO_Pin_10;
????GPIO_InitStructure.GPIO_Speed?=?GPIO_Speed_50MHz;
????GPIO_InitStructure.GPIO_Mode?=?GPIO_Mode_AF_PP;
????GPIO_Init(GPIOC,?&GPIO_InitStructure);

????GPIO_InitStructure.GPIO_Pin?=?GPIO_Pin_11;
????GPIO_InitStructure.GPIO_Mode?=?GPIO_Mode_IN_FLOATING;
????GPIO_Init(GPIOC,?&GPIO_InitStructure);??

????USART_InitStructure.USART_BaudRate???=?9600;
????USART_InitStructure.USART_WordLength?=?USART_WordLength_8b;
????USART_InitStructure.USART_StopBits???=?USART_StopBits_1;
????USART_InitStructure.USART_Parity?????=?USART_Parity_No;
????USART_InitStructure.USART_HardwareFlowControl?=?USART_HardwareFlowControl_None;
????USART_InitStructure.USART_Mode?=?USART_Mode_Tx?|?USART_Mode_Rx;

????USART_Init(USART3,?&USART_InitStructure);
????USART_Cmd(USART3,?ENABLE);



熱門產(chǎn)品 : USB3.0 HUB控制器:CH634
????GPIO_InitTypeDef??GPIO_InitStructure?=?{0};
????USART_InitTypeDef?USART_InitStructure?=?{0};

????RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART3,?ENABLE);
????RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC?|?RCC_APB2Periph_GPIOB,?ENABLE);
????RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO,?ENABLE);

????GPIO_PinRemapConfig(GPIO_PartialRemap_USART3,?ENABLE);

????/*?UART3?TX-->C.10???RX-->C.11?*/
????GPIO_InitStructure.GPIO_Pin?=?GPIO_Pin_10;
????GPIO_InitStructure.GPIO_Speed?=?GPIO_Speed_50MHz;
????GPIO_InitStructure.GPIO_Mode?=?GPIO_Mode_AF_PP;
????GPIO_Init(GPIOC,?&GPIO_InitStructure);

????GPIO_InitStructure.GPIO_Pin?=?GPIO_Pin_11;
????GPIO_InitStructure.GPIO_Mode?=?GPIO_Mode_IN_FLOATING;
????GPIO_Init(GPIOC,?&GPIO_InitStructure);??

????USART_InitStructure.USART_BaudRate???=?9600;
????USART_InitStructure.USART_WordLength?=?USART_WordLength_8b;
????USART_InitStructure.USART_StopBits???=?USART_StopBits_1;
????USART_InitStructure.USART_Parity?????=?USART_Parity_No;
????USART_InitStructure.USART_HardwareFlowControl?=?USART_HardwareFlowControl_None;
????USART_InitStructure.USART_Mode?=?USART_Mode_Tx?|?USART_Mode_Rx;

????USART_Init(USART3,?&USART_InitStructure);
????USART_Cmd(USART3,?ENABLE);



您好,附件例程是PC10、PC11作為串口3使用的例程,可以參考一下

icon_rar.gifCH32V208 串口3.zip



只有登錄才能回復(fù),可以選擇微信賬號(hào)登錄

国产91精品新入口,国产成人综合网在线播放,九热这里只有精品,本道在线观看,美女视频a美女视频,韩国美女激情视频,日本美女pvp视频