免费观看中文字幕午夜理论,国产伦精品一区二区三区视频,一级少妇女片完整版免费,国产日韩欧美拔插一区

  • <blockquote id="yunhb"></blockquote>
  • <cite id="yunhb"><listing id="yunhb"></listing></cite>
      1. 
        
        <dl id="yunhb"></dl>
      2. 您好,歡迎訪問上海意泓電子科技有限責(zé)任公司網(wǎng)站!
        4新聞資訊
        您的位置: 首頁 ->  新聞資訊 -> 單片機(jī)

        ?STM32要使用JTMS(PA13)、 JTCK(PA14)作為普通I/O口

        文章出處:?jiǎn)纹瑱C(jī) 責(zé)任編輯:上海意泓電子科技有限責(zé)任公司 發(fā)表時(shí)間:
        2020
        11-10

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

          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);                       

        }


        上海意泓電子科技有限責(zé)任公司 版權(quán)所有 未經(jīng)授權(quán)禁止復(fù)制或鏡像

        CopyRight 2020-2025 www.lshjx.com All rights reserved   滬ICP備2021005866號(hào)