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

標題: STM32F1 SD卡升級用戶代碼 bootloader_IAP [打印本頁]

作者: yx216    時間: 2018-5-2 16:12
標題: STM32F1 SD卡升級用戶代碼 bootloader_IAP
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.   /* 如果按鍵按下, 執行IAP驅動程序更新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();  /* 執行用戶程序 */
  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****/
復制代碼

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



作者: 0605    時間: 2019-2-27 15:42
F1系列小容量和中容量貌似沒有SDIO接口啊
作者: Whw2    時間: 2019-4-9 16:33
程序占用了19K的ROM啊,從3000開始跑APP程序會不會不夠啊
作者: 一期一會619    時間: 2020-5-2 14:43
謝謝分享
作者: miskel    時間: 2021-7-28 15:26
試試好不好用




歡迎光臨 (http://www.raoushi.com/bbs/) Powered by Discuz! X3.1