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

 找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

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

STM32F1 SD卡升級用戶代碼 bootloader_IAP

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

單片機源程序如下:
  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ū)動程序更新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ù)

使用道具 舉報

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

使用道具 舉報

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

使用道具 舉報

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

使用道具 舉報

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

使用道具 舉報

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

本版積分規(guī)則

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

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

快速回復(fù) 返回頂部 返回列表