<dl id="b4zrn"><label id="b4zrn"></label></dl><thead id="b4zrn"></thead>

    <blockquote id="b4zrn"></blockquote>

      <strike id="b4zrn"></strike>
        1. <div id="b4zrn"><label id="b4zrn"></label></div>
          您好,歡迎訪問上海意泓電子科技有限責任公司網(wǎng)站!
          4新聞資訊
          您的位置: 首頁 ->  新聞資訊 -> 單片機

          ?STM32 關(guān)于復位類型的判斷及軟件復位 bug

          文章出處:單片機 責任編輯:上海意泓電子科技有限責任公司 發(fā)表時間:
          2018
          05-19

          STM 32在復位時,有嚴重BUG:

          1.上電復位和外置的看門狗芯片重啟復位是無法區(qū)分開來的!RCC_FLAG_BORRST,  RCC_FLAG_PINRST,   RCC_FLAG_LPWRRST三個都復位了!

          2.這樣當要在上電復位初始化關(guān)鍵代碼時,這些代碼看門狗復位則不用重啟,這個關(guān)鍵代碼會導致應用業(yè)務的異常!若兩個中斷分不開,導致系統(tǒng)異??撮T狗復位時影響業(yè)務!


          /*
          RCC_FLAG_BORRST:     POR/PDR or BOR reset  //Power-on/power-down reset (POR/PDR reset) or brownout (BOR) reset
          RCC_FLAG_PINRST:       Pin reset                      //NRST pin可能為看門狗重啟
          RCC_FLAG_PORRST:      POR/PDR reset
          RCC_FLAG_SFTRST:      Software reset
          RCC_FLAG_IWDGRST:   Independent Watchdog reset
          RCC_FLAG_WWDGRST: Window Watchdog reset
          RCC_FLAG_LPWRRST:    Low Power reset
          */
          /*****************************************************************************************
            函  數(shù)  名: SysRstSrcRecord
            參  數(shù):  無
            返  回  值: 系統(tǒng)重啟次數(shù)記錄
            描  述:  記錄系統(tǒng)重啟的方式記錄
            作  者:  李少雄
            版  本:  V1.0 2012年11月12日
          ******************************************************************************************/
          u8 SysRstSrcRecord(u8 *pstRest)
          {
              //u8 uchInfoChange=0;
              
              pstRest[0] = RCC_GetFlagStatus(RCC_FLAG_BORRST);
              pstRest[1] = RCC_GetFlagStatus(RCC_FLAG_PINRST);
              pstRest[2] = RCC_GetFlagStatus(RCC_FLAG_PORRST);
              pstRest[3] = RCC_GetFlagStatus(RCC_FLAG_SFTRST);   
              pstRest[4] = RCC_GetFlagStatus(RCC_FLAG_IWDGRST);
              pstRest[5] = RCC_GetFlagStatus(RCC_FLAG_WWDGRST);
              pstRest[6] = RCC_GetFlagStatus(RCC_FLAG_LPWRRST);

          }


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

          CopyRight 2020-2025 m.frontgate.com.cn All rights reserved   滬ICP備2021005866號

          久艹视频在线观看这里只有精品,国语自产拍在线视频普通话94,久久婷婷综合缴情亚洲狠狠,亚洲不卡永远在线精品无码
          <dl id="b4zrn"><label id="b4zrn"></label></dl><thead id="b4zrn"></thead>

            <blockquote id="b4zrn"></blockquote>

              <strike id="b4zrn"></strike>
                1. <div id="b4zrn"><label id="b4zrn"></label></div>