久久久久久久999_99精品久久精品一区二区爱城_成人欧美一区二区三区在线播放_国产精品日本一区二区不卡视频_国产午夜视频_欧美精品在线观看免费
標(biāo)題:
HC32F460的IAP例程與資料
[打印本頁]
作者:
pp8899
時間:
2021-6-23 18:25
標(biāo)題:
HC32F460的IAP例程與資料
這是華大的HC32F460的IAP例程,供大家參考。
51hei.png
(8.04 KB, 下載次數(shù): 116)
下載附件
2021-6-23 19:11 上傳
以上資料下載:
hc32f460_iap資料.7z
(3.11 MB, 下載次數(shù): 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)
*****************************************************************************/
復(fù)制代碼
作者:
yutouyes
時間:
2021-9-2 16:49
好資料,51黑有你更精彩!!!
作者:
cliff_w
時間:
2022-3-31 16:28
感謝感謝,找了很久終于找到了
作者:
150315175
時間:
2022-4-26 09:53
這個資料在哪里找的啊?我去官網(wǎng)都沒找到
作者:
mmloster001
時間:
2023-3-13 22:01
感謝,,,,馬上下載來研究研究
歡迎光臨 (http://www.zg4o1577.cn/bbs/)
Powered by Discuz! X3.1
主站蜘蛛池模板:
国产一级一级国产
|
国产成人午夜精品影院游乐网
|
91精品国产一区二区三区蜜臀
|
91大神xh98xh系列全部
|
亚洲视频精品
|
国产九九九
|
成人福利电影
|
日本一区二区高清不卡
|
91在线精品一区二区
|
国产精品一区二区在线
|
日韩午夜一区二区三区
|
国产日韩亚洲欧美
|
国产精品久久性
|
免费在线观看h片
|
欧美三级视频在线观看
|
中文字幕一区二区三区不卡在线
|
日产精品久久久一区二区福利
|
精品欧美一区二区中文字幕视频
|
久久aⅴ乱码一区二区三区 亚洲国产成人精品久久久国产成人一区
|
成人99
|
91九色婷婷
|
欧美一级二级三级视频
|
九九99靖品
|
久久久99精品免费观看
|
欧美日韩一区二区在线播放
|
精品国产伦一区二区三区观看体验
|
日韩精品一区二区三区在线播放
|
欧美成人免费在线
|
91久久综合亚洲鲁鲁五月天
|
一区二区福利视频
|
亚洲一区久久
|
久久久久久久久久久久久久国产
|
中文字幕 国产精品
|
国产精品色
|
国产欧美一区二区三区日本久久久
|
风间由美一区二区三区在线观看
|
亚洲午夜精品
|
亚洲国产精品一区二区第一页
|
久久久久久综合
|
国产午夜精品一区二区三区四区
|
久久精品中文字幕
|