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

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

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

        STM 32在復(fù)位時(shí),有嚴(yán)重BUG:

        1.上電復(fù)位和外置的看門狗芯片重啟復(fù)位是無(wú)法區(qū)分開(kāi)來(lái)的!RCC_FLAG_BORRST,  RCC_FLAG_PINRST,   RCC_FLAG_LPWRRST三個(gè)都復(fù)位了!

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


        /*
        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ù):  無(wú)
          返  回  值: 系統(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);

        }


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

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

        在线观看理论片国产,久久精品成视频播放,国产在线国语对白,国产拍拍拍无码免费视频
        <thead id="hmjeg"><listing id="hmjeg"></listing></thead>
            
            
            <dl id="hmjeg"></dl>
          1. <strike id="hmjeg"></strike>