欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136
標題:
STM32F1 SD卡升級用戶代碼 bootloader_IAP
[打印本頁]
作者:
yx216
時間:
2018-5-2 16:12
標題:
STM32F1 SD卡升級用戶代碼 bootloader_IAP
SD卡升級具體看代碼 , 以后還有U盤升級, 遠程升級等
bootloader_iap_sd
單片機源程序如下:
/*************************************************************
*************************************************************/
#include "includes.h"
extern pFunction Jump_To_Application;
extern uint32_t JumpAddress;
/* Private function prototypes -----------------------------------------------*/
/* Private functions ---------------------------------------------------------*/
/*******************************************************************************
* @brief Main program.
* @param None
* @retval None
*******************************************************************************/
unsigned int key_flag = 0;
int main(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
//Flash解鎖
FLASH_Unlock();
//Test if Key push-button on STM3210X-EVAL Board is pressed
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA,ENABLE);//
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5;//PA5
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU; //
GPIO_Init(GPIOA, &GPIO_InitStructure);//
key_flag = GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_5);
/* 如果按鍵按下, 執行IAP驅動程序更新Flash程序 */
if (!key_flag)
{
//串口初始化
BSP_Init();
SerialPutString("\r\n======================================================================");
SerialPutString("\r\n .\"\". .\"\",");
SerialPutString("\r\n | | / /");
SerialPutString("\r\n | | / /");
SerialPutString("\r\n | | / /");
SerialPutString("\r\n | |/ ;-._ ");
SerialPutString("\r\n } ` _/ / ;");
SerialPutString("\r\n | /` ) / /");
SerialPutString("\r\n | / /_/\\_/\\");
SerialPutString("\r\n |/ / |");
SerialPutString("\r\n ( ' \\ '- |");
SerialPutString("\r\n \\ `. /");
SerialPutString("\r\n | |");
SerialPutString("\r\n | |");
SerialPutString("\r\n= Bootloader for STM32F10X v1.0.1 =");
SerialPutString("\r\n= COPYRIGHT@2012 Wanwei Tech =");
SerialPutString("\r\n======================================================================");
SerialPutString("\r\n\r\n");
Main_Menu ();
}
else
{
IAP_JumpToApplication(); /* 執行用戶程序 */
}
while (1)
{
}
}
#ifdef USE_FULL_ASSERT
/*******************************************************************************
* @brief Reports the name of the source file and the source line number
* where the CHECK_PARAM error has occurred.
* @param[in] file Pointer to the source file name
* @param[in] line assert_param error line source number
* @return None
*******************************************************************************/
void assert_failed(uint8_t* file, uint32_t line)
{
printf("Wrong parameters value: file %s on line %d\r\n", file, line);
//while(1);
}
#endif /* USE_FULL_ASSERT */
/**
* @}
*/
/******************* (C) COPYRIGHT 2010 STMicroelectronics *****END OF FILE****/
復制代碼
所有資料51hei提供下載:
bootloader_iap_sd.rar
(1.16 MB, 下載次數: 183)
2018-5-2 16:10 上傳
點擊文件名下載附件
下載積分: 黑幣 -5
作者:
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