久久久久久久999_99精品久久精品一区二区爱城_成人欧美一区二区三区在线播放_国产精品日本一区二区不卡视频_国产午夜视频_欧美精品在线观看免费

 找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 5035|回復(fù): 4
打印 上一主題 下一主題
收起左側(cè)

STM32F1 SD卡升級(jí)用戶代碼 bootloader_IAP

  [復(fù)制鏈接]
跳轉(zhuǎn)到指定樓層
樓主
ID:320543 發(fā)表于 2018-5-2 16:12 | 只看該作者 回帖獎(jiǎng)勵(lì) |倒序?yàn)g覽 |閱讀模式
SD卡升級(jí)具體看代碼 , 以后還有U盤升級(jí), 遠(yuǎn)程升級(jí)等
bootloader_iap_sd

單片機(jī)源程序如下:
  1. /*************************************************************
  2. *************************************************************/

  3. #include "includes.h"


  4. extern pFunction Jump_To_Application;
  5. extern uint32_t JumpAddress;

  6. /* Private function prototypes -----------------------------------------------*/


  7. /* Private functions ---------------------------------------------------------*/


  8. /*******************************************************************************
  9. * @brief  Main program.
  10. * @param  None
  11. * @retval None
  12. *******************************************************************************/
  13. unsigned int key_flag = 0;
  14. int main(void)
  15. {
  16.         GPIO_InitTypeDef GPIO_InitStructure;       
  17.   //Flash解鎖
  18.         FLASH_Unlock();       
  19.   //Test if Key push-button on STM3210X-EVAL Board is pressed
  20.         RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA,ENABLE);//       
  21.         GPIO_InitStructure.GPIO_Pin  = GPIO_Pin_5;//PA5
  22.         GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU; //
  23.         GPIO_Init(GPIOA, &GPIO_InitStructure);//
  24.        
  25.         key_flag = GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_5);
  26.        
  27.   /* 如果按鍵按下, 執(zhí)行IAP驅(qū)動(dòng)程序更新Flash程序 */
  28.   if (!key_flag)
  29.   {
  30.                 //串口初始化
  31.     BSP_Init();
  32.     SerialPutString("\r\n======================================================================");
  33.                 SerialPutString("\r\n                .\"\".    .\"\",");
  34.                 SerialPutString("\r\n                |  |   /  /");
  35.                 SerialPutString("\r\n                |  |  /  /");
  36.                 SerialPutString("\r\n                |  | /  /");
  37.                 SerialPutString("\r\n                |  |/  ;-._ ");
  38.                 SerialPutString("\r\n                }  ` _/  / ;");
  39.                 SerialPutString("\r\n                |  /` ) /  /");
  40.                 SerialPutString("\r\n                | /  /_/\\_/\\");
  41.                 SerialPutString("\r\n                |/  /      |");
  42.                 SerialPutString("\r\n                (  ' \\ '-  |");
  43.                 SerialPutString("\r\n                 \\    `.  /");
  44.                 SerialPutString("\r\n                  |      |");
  45.                 SerialPutString("\r\n                  |      |");
  46.                 SerialPutString("\r\n=                               Bootloader for STM32F10X  v1.0.1     =");
  47.                 SerialPutString("\r\n=                               COPYRIGHT@2012     Wanwei Tech       =");
  48.     SerialPutString("\r\n======================================================================");
  49.     SerialPutString("\r\n\r\n");
  50.     Main_Menu ();
  51.   }
  52.   else       
  53.         {  
  54.                 IAP_JumpToApplication();  /* 執(zhí)行用戶程序 */
  55.         }
  56.        
  57.   while (1)
  58.   {
  59.         }
  60. }


  61. #ifdef  USE_FULL_ASSERT
  62. /*******************************************************************************
  63. * @brief                Reports the name of the source file and the source line number
  64. *                                 where the CHECK_PARAM error has occurred.
  65. * @param[in]        file Pointer to the source file name
  66. * @param[in]    line assert_param error line source number
  67. * @return                None
  68. *******************************************************************************/
  69. void assert_failed(uint8_t* file, uint32_t line)
  70. {
  71.         printf("Wrong parameters value: file %s on line %d\r\n", file, line);
  72. //while(1);
  73. }
  74. #endif /* USE_FULL_ASSERT */


  75. /**
  76.   * @}
  77.   */

  78. /******************* (C) COPYRIGHT 2010 STMicroelectronics *****END OF FILE****/
復(fù)制代碼

所有資料51hei提供下載:
bootloader_iap_sd.rar (1.16 MB, 下載次數(shù): 183)


分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏6 分享淘帖 頂 踩
回復(fù)

使用道具 舉報(bào)

沙發(fā)
ID:445582 發(fā)表于 2019-2-27 15:42 | 只看該作者
F1系列小容量和中容量貌似沒有SDIO接口啊
回復(fù)

使用道具 舉報(bào)

板凳
ID:130559 發(fā)表于 2019-4-9 16:33 | 只看該作者
程序占用了19K的ROM啊,從3000開始跑APP程序會(huì)不會(huì)不夠啊
回復(fù)

使用道具 舉報(bào)

地板
ID:297069 發(fā)表于 2020-5-2 14:43 | 只看該作者
謝謝分享
回復(fù)

使用道具 舉報(bào)

5#
ID:59363 發(fā)表于 2021-7-28 15:26 | 只看該作者
試試好不好用
回復(fù)

使用道具 舉報(bào)

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

本版積分規(guī)則

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

Powered by 單片機(jī)教程網(wǎng)

快速回復(fù) 返回頂部 返回列表
主站蜘蛛池模板: 琪琪午夜伦伦电影福利片 | 成人在线观看免费爱爱 | 亚洲精品电影在线 | 欧美日韩看片 | 欧美精品一区二区三区在线播放 | 国产午夜久久 | 欧美日韩不卡合集视频 | 国产中文 | 久久久久久91香蕉国产 | 在线国产一区二区 | 午夜久久久久久久久久一区二区 | 免费成人高清在线视频 | 国产精品美女一区二区 | 成人婷婷| 99热都是精品| 成人欧美一区二区三区视频xxx | 亚洲色在线视频 | 日韩欧美一级精品久久 | 国产电影一区二区三区爱妃记 | 91精品久久久久久久久久 | 亚洲精品电影网在线观看 | 亚洲国产成人精品女人久久久 | 亚洲一区二区三区观看 | 国产精品伦一区二区三级视频 | 欧美综合在线观看 | 伊人无码高清 | 亚洲精品粉嫩美女一区 | 中文字幕在线免费视频 | 97久久精品午夜一区二区 | www.日韩在线 | 亚洲精品国产综合区久久久久久久 | 中文字幕在线观看一区二区 | 能看的av | 日韩有码一区二区三区 | 伊人久操| 中文字幕第十一页 | 午夜爽爽男女免费观看hd | 一区二区三区四区在线 | 免费毛片www com cn | 91.com在线观看| 91大神在线资源观看无广告 |