欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136

 找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 1666|回復: 2
收起左側

STM32單片機bootloader IAP升級例程

[復制鏈接]
ID:1109580 發表于 2024-1-18 12:32 | 顯示全部樓層 |閱讀模式
基于STM32F103ZET6芯片,實際使用沒有問題

單片機源程序如下:
  1. /** @addtogroup IAP
  2.   * @{
  3.   */

  4. /* Includes ------------------------------------------------------------------*/
  5. #include "common.h"
  6. #include "bsp.h"
  7. #include "cortexm3_macro.h"

  8. /* Private typedef -----------------------------------------------------------*/
  9. /* Private define ------------------------------------------------------------*/
  10. /* Private macro -------------------------------------------------------------*/
  11. /* Private variables ---------------------------------------------------------*/


  12. /* Private function prototypes -----------------------------------------------*/




  13. /*******************************************************************************
  14. * Function Name  : main
  15. * Description    : Main program.
  16. * Input          : None
  17. * Output         : None
  18. * Return         : None
  19. *******************************************************************************/
  20. int main(void)
  21. {
  22.     u8 flg = 0;

  23. #ifdef DEBUG
  24.     debug();
  25. #endif
  26.    
  27.     BspInit();
  28.     CommonInit();

  29.     while (1)
  30.     {
  31.         CommonExec();
  32.         
  33.         if (IS_TIMEOUT_1MS(eTim1, 1000))
  34.         {
  35.             flg? LedOn(LED_5) : LedOff(LED_5);
  36.             flg = !flg;
  37.         }
  38.     }
  39. }

  40. #ifdef  DEBUG
  41. /*******************************************************************************
  42. * Function Name  : assert_failed
  43. * Description    : Reports the name of the source file and the source line number
  44. *                  where the assert_param error has occurred.
  45. * Input          : - file: pointer to the source file name
  46. *                  - line: assert_param error line source number
  47. * Output         : None
  48. * Return         : None
  49. *******************************************************************************/
  50. void assert_failed(u8* file, u32 line)
  51. {
  52.   /* User can add his own implementation to report the file name and line number,
  53.      ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */

  54.   /* Infinite loop */
  55.   while (1)
  56.   {
  57.   }
  58. }
  59. #endif
復制代碼

原理圖: 無
仿真: 無
代碼(僅供參考,有錯誤請指出): bootloader.7z (198.05 KB, 下載次數: 28)

評分

參與人數 1黑幣 +50 收起 理由
admin + 50 共享資料的黑幣獎勵!

查看全部評分

回復

使用道具 舉報

ID:164385 發表于 2024-1-25 23:11 | 顯示全部樓層
很好的介紹,謝謝了
回復

使用道具 舉報

ID:18591 發表于 2024-2-2 09:50 | 顯示全部樓層
非常好,謝謝樓主
回復

使用道具 舉報

無效樓層,該帖已經被刪除
5#
無效樓層,該帖已經被刪除
您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規則

小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術交流QQ群281945664

Powered by 單片機教程網

快速回復 返回頂部 返回列表