久久久久久久999_99精品久久精品一区二区爱城_成人欧美一区二区三区在线播放_国产精品日本一区二区不卡视频_国产午夜视频_欧美精品在线观看免费
標題:
HC32F460的IAP例程與資料
[打印本頁]
作者:
pp8899
時間:
2021-6-23 18:25
標題:
HC32F460的IAP例程與資料
這是華大的HC32F460的IAP例程,供大家參考。
51hei.png
(8.04 KB, 下載次數: 116)
下載附件
2021-6-23 19:11 上傳
以上資料下載:
hc32f460_iap資料.7z
(3.11 MB, 下載次數: 215)
2021-6-23 19:14 上傳
點擊文件名下載附件
下載積分: 黑幣 -5
/*******************************************************************************
* Include files
******************************************************************************/
#include "iap.h"
#include "basic.h"
#include "flash.h"
#include "uart.h"
#include "modem.h"
#include "User_Timer.h"
/*******************************************************************************
* Local type definitions ('typedef')
******************************************************************************/
/*******************************************************************************
* Local pre-processor symbols/macros ('#define')
******************************************************************************/
/*******************************************************************************
* Global variable definitions (declared in header file with 'extern')
******************************************************************************/
uint32_t JumpAddress;
func_ptr_t JumpToApplication;
/*******************************************************************************
* Local function prototypes ('static')
******************************************************************************/
static en_result_t IAP_JumpToApp(uint32_t u32Addr);
static void IAP_ResetConfig(void);
/*******************************************************************************
* Local variable definitions ('static')
******************************************************************************/
/*******************************************************************************
* Function implementation - global ('extern') and local ('static')
******************************************************************************/
/**
*******************************************************************************
** \brief Initialize IAP
**
** \param [in] None
**
** \retval None
**
******************************************************************************/
void IAP_Init(void)
{
SystemClock_Init();
LED_Init();
UART_Init();
}
/**
*******************************************************************************
** \brief UART receive byte.
**
** \param [out] u8RxData Pointer to Rx data.
**
** \retval Ok Receive data finished.
** \retval Error Don't receive data.
**
******************************************************************************/
void IAP_Main(void)
{
uint32_t u32AppFlag;
en_result_t enRet;
while (1)
{
enRet = Modem_Process(BOOT_WAIT_TIME);
if ((enRet == Ok) || (enRet == ErrorTimeout))
{
u32AppFlag = *(__IO uint32_t *)BOOT_PARA_ADDRESS;
if ((0xFFFF != u32AppFlag))
{
if (Error == IAP_JumpToApp(APP_ADDRESS))
{
LED0_OFF();
LED1_ON();
}
}
else
{
LED0_ON();
LED1_ON();
}
}
else
{
LED1_OFF();
LED0_ON();
}
}
}
/**
*******************************************************************************
** \brief IAP main function
**
** \param [in] u32Addr APP address
**
** \retval Error APP address error
**
******************************************************************************/
static en_result_t IAP_JumpToApp(uint32_t u32Addr)
{
uint32_t u32StackTop = *((__IO uint32_t *)u32Addr);
/* Check if user code is programmed starting from address "u32Addr" */
/* Check stack top pointer. */
if ((u32StackTop > SRAM_BASE) && (u32StackTop <= (SRAM_BASE + RAM_SIZE)))
{
IAP_ResetConfig();
/* Jump to user application */
JumpAddress = *(__IO uint32_t *)(u32Addr + 4);
JumpToApplication = (func_ptr_t)JumpAddress;
/* Initialize user application's Stack Pointer */
__set_MSP(*(__IO uint32_t *)u32Addr);
JumpToApplication();
}
return Error;
}
/**
*******************************************************************************
** \brief Boot reset configure
**
** \param [in] None
**
** \retval None
**
******************************************************************************/
static void IAP_ResetConfig(void)
{
LED_DeInit();
UART_DeInit();
Timer_DeInit();
SystemClock_DeInit();
}
/******************************************************************************
* EOF (not truncated)
*****************************************************************************/
復制代碼
作者:
yutouyes
時間:
2021-9-2 16:49
好資料,51黑有你更精彩!!!
作者:
cliff_w
時間:
2022-3-31 16:28
感謝感謝,找了很久終于找到了
作者:
150315175
時間:
2022-4-26 09:53
這個資料在哪里找的啊?我去官網都沒找到
作者:
mmloster001
時間:
2023-3-13 22:01
感謝,,,,馬上下載來研究研究
歡迎光臨 (http://m.zg4o1577.cn/bbs/)
Powered by Discuz! X3.1
主站蜘蛛池模板:
亚洲欧洲一区二区
|
国产高清在线精品一区二区三区
|
久久精品久久精品久久精品
|
www.久久影视
|
日韩在线视频一区
|
欧美成年黄网站色视频
|
日本一二三区高清
|
欧美一区二区三区免费在线观看
|
国产精品久久久久久久久久三级
|
久久久精品久久
|
欧美一区二区三区在线观看视频
|
国产黄色小视频
|
国产精品视频一二三区
|
国产视频精品免费
|
国产精品99久久久久久人
|
中文字幕国产视频
|
国产一级毛片视频
|
中文字幕国产精品视频
|
九九热精品视频
|
www.久久
|
久久一二区
|
久久丁香
|
日韩成人精品在线
|
国产精品日韩欧美一区二区
|
精品综合在线
|
日韩三级一区
|
日韩中文字幕
|
久久午夜精品福利一区二区
|
一区二区三区视频
|
中文字幕av亚洲精品一部二部
|
久久久久久久久久久福利观看
|
毛片一区二区三区
|
日韩在线观看一区二区三区
|
日本在线你懂的
|
日本在线视频中文字幕
|
日韩一级免费观看
|
在线观看中文字幕av
|
精品久久久久久久
|
亚州视频在线
|
黄色片视频
|
美女艹b
|