N32G45XVL重映射IO口问题
我把PA13和PA14重映射成了普通IO口,导致没办法烧写程序了,板子是N32G45XV,麻烦帮我看下该如何解决,谢谢 重映射部分用的例程代码void JTAGPortInit(void)
{
GPIO_InitType GPIO_InitStructure;
RCC_EnableAPB2PeriphClk(RCC_APB2_PERIPH_AFIO | RCC_APB2_PERIPH_GPIOA | RCC_APB2_PERIPH_GPIOB, ENABLE);
// Configure PA.13 (JTMS/SWDAT), PA.14 (JTCK/SWCLK) and PA.15 (JTDI) as
output push-pull
GPIO_InitStructure.Pin = GPIO_PIN_13; //| GPIO_PIN_14; TX
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode= GPIO_Mode_Out_PP;
GPIO_InitPeripheral(GPIOA, &GPIO_InitStructure);
//
GPIO_InitStructure.Pin = GPIO_PIN_14;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;//GPIO_Mode_IPU;
GPIO_InitPeripheral(USARTx_GPIO, &GPIO_InitStructure); //初始化
RCC_EnableAPB2PeriphClk(RCC_APB2_PERIPH_AFIO, ENABLE);
//Disable the Serial Wire and JTAG Debug Port SWJ-DP
GPIO_ConfigPinRemap(GPIO_RMP_SW_JTAG_DISABLE, ENABLE);
} 把boot脚拉高,然后复位下载
页:
[1]