亚洲春色中文字幕久久久-三上亚,一吻二脱三床四吻胸,国产真实伦对白视频全集,在线毛片观看,精品成品入口黄网,国产毛aⅴ片久久久,亚洲AV色香蕉一区二区三区老师,萧皇后A级艳片,色情日本视频更新,99久久亚洲精品日本无码
標題:
STM8s的IAP升級源程序 bootloader與APP
[打印本頁]
作者:
王杰
時間:
2019-10-9 17:36
標題:
STM8s的IAP升級源程序 bootloader與APP
測試有效,僅供參考
單片機源程序如下:
/*****
Copyright 2016-2020 Alex.Fang All rights reserved.
Header: stm8s105c6t6 IAP code
File Name: main.c
Author: Alex.Fang
Date: 2016-07-22
免責聲明:
此代碼你可以用來學習和交流。不得商用!應用此程序釀成事故由你自己承擔!
本人不負責維護和支持此代碼!如有疑問和看不懂別來煩我! ^_^
openedv論壇好友可以隨便下載和轉給他人參閱學習。
版權遵循 = GPL
Disclaimer of liability:
This code you can use to learn and communicate. No commercial!
Use this procedure to cause accidents by yourself!
I am not responsible for the maintenance and support of this code!
If you have any questions and cannot read don't bother me! ^_^
Openedv forum friends can easily download and
transfer to other people see learning.
copyright = GPL
********/
/* Includes ------------------------------------------------------------------*/
#include <string.h>
#include <stdio.h>
#include "stm8s.h"
#include "stm8s_clk.h"
#include "main.h"
//#include "stm8s_wwdg.h"
#include "delay.h"
#include "flash.h"
#include "stm8s_flash.h"
#include "config.h"
#include "IO_config.h"
#include "crc16.h"
#include "xmodem.h"
#include "stm8s_uart2.h"
#include "uart2.h"
//#include "stm8s_tim2.h"
//#include "wwdg.h"
//#define NGI() _asm("sim"); /* 禁止全局中斷 */
//#define EGI() _asm("rim"); /* 使能全局中斷 */
//#define WFI() _asm("halt"); /*進入到低功耗模 WFI */
/* Private defines -----------------------------------------------------------*/
/* Private function prototypes -----------------------------------------------*/
/* Private functions ---------------------------------------------------------*/
//address for GO command
//TFunction GoAddress;
void STM8_CLK_Init(void)
{
CLK_DeInit();//復位時鐘寄存器
CLK_HSICmd(ENABLE);//HSI = 16MHz
CLK_HSIPrescalerConfig(CLK_PRESCALER_HSIDIV1); //f_psc = 16MHz/1
//CLK_ClockSecuritySystemEnable();//開啟時鐘安全系統
//enableInterrupts();
}
void system_init(void)
{
STM8_CLK_Init();
FLASH_DeInit();
Init_GPIO();
Init_UART2();
}
void main(void)
{
//_asm("sim");//關全部中斷
disableInterrupts();
system_init();
//_asm("rim");//開全部中斷
enableInterrupts();
uart2_data("\r\n\r\n",4);
uart2_data("Bootloader Start...\r\n",21);
uart2_data("Ver=20160722_1.0\r\n",18);
disableInterrupts();
//unlock_PROG();
//unlock_DATA();
//Print("goto app...\r\n");
//goto_app();
//Print("Failed!\r\n");
//waiting_time_count=200;
Xmoden_STate = IDLE;
//RS232_Tran_Chr(NAK);
disp_menu();
while (1)
{
RS232_ISR();
RS232_Rec_Xmodem();
}//end while
}
復制代碼
所有資料51hei提供下載:
bootloader.7z
(3.99 MB, 下載次數: 86)
2019-10-10 01:18 上傳
點擊文件名下載附件
下載積分: 黑幣 -5
APP.7z
(3.98 MB, 下載次數: 64)
2019-10-10 01:18 上傳
點擊文件名下載附件
下載積分: 黑幣 -5
作者:
jeeseliu
時間:
2019-11-16 17:04
感謝分享
作者:
jeeseliu
時間:
2019-11-17 12:36
能簡單說一下如何使用嗎?
作者:
王杰
時間:
2019-11-26 15:44
jeeseliu 發表于 2019-11-17 12:36
能簡單說一下如何使用嗎?
先把BootLoader1程序燒進板子,然后用上位機給MCU發送APP代碼,讓mcu自己寫進flash里面去執行
作者:
dreamfly
時間:
2020-1-5 15:51
上位機工具有提供嗎?
作者:
張明211
時間:
2020-6-19 19:57
學習了!
歡迎光臨 (http://www.denmoz.com/bbs/)
Powered by Discuz! X3.1