久久人妻精品人妻视频五月天一区二区三区,,自慰午夜喷水久久久av国产成人a视频高在线,,欧美日韩免费专区在线97精品国产手机

  • <cite id="cwywg"></cite>
    <button id="cwywg"></button>
  • <button id="cwywg"><source id="cwywg"></source></button>
    <button id="cwywg"><tbody id="cwywg"></tbody></button>
  • <button id="cwywg"></button>
  • 
    
  • logo logo
    • BANNER
    • BANNER
    • BANNER
    您的位置 : 首頁 > 新聞資訊 > 技術(shù)支持
    STM32要使用JTMS(PA13)、 JTCK(PA14)作為普通I/O口
    發(fā)布者:江蘇瑞易通電子科技有限公司 人氣:643 發(fā)布日期:2021-04-23 10:10:40

    在STM32要使用JTMS(PA13)、  JTCK(PA14)作為普通I/O口的時候,要在初始化前添加如下代碼(順序不能顛倒):

      RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO, ENABLE);

    GPIO_PinRemapConfig(GPIO_Remap_SWJ_Disable , ENABLE);


    如:

    void LED_Init(void)
    {
     
     GPIO_InitTypeDef  GPIO_InitStructure;
         
        
        
        RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA|RCC_APB2Periph_AFIO, ENABLE);  
    GPIO_PinRemapConfig(GPIO_Remap_SWJ_Disable , ENABLE);

        GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8;                
     GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;     
     GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
     GPIO_Init(GPIOA, &GPIO_InitStructure);
     GPIO_SetBits(GPIOA,GPIO_Pin_8);                       

     GPIO_InitStructure.GPIO_Pin = GPIO_Pin_13;           
     GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;      
     GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
     GPIO_Init(GPIOA, &GPIO_InitStructure);
     GPIO_ResetBits(GPIOA,GPIO_Pin_13);                         
        
    GPIO_InitStructure.GPIO_Pin = GPIO_Pin_14;                 
     GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;          
     GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
     GPIO_Init(GPIOA, &GPIO_InitStructure);
     GPIO_ResetBits(GPIOA,GPIO_Pin_14);        

     GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6;              
     GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;       
     GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
     GPIO_Init(GPIOA, &GPIO_InitStructure);
     GPIO_ResetBits(GPIOA,GPIO_Pin_6);            

     RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOD, ENABLE);  

     GPIO_InitStructure.GPIO_Pin = GPIO_Pin_2;               
     GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;       
     GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; 
     GPIO_Init(GPIOD, &GPIO_InitStructure);    
     GPIO_SetBits(GPIOD,GPIO_Pin_2);                       

    }


    返回新聞列表