Job_SignsPads/STM32/Code/STM32-IAP/USER/general_config.h
2025-04-22 10:29:37 +08:00

30 lines
1.3 KiB
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef GENERAL_CONFIG_H
#define GENERAL_CONFIG_H
#include "stm32f4xx.h"
#define FLASH_INIT_ADDR 0X08004000//呼吸心率上下限存储
#define FLASH_DATA_FLAG_ADDR 0x08008000//FLASH_Sector_2
#define FLASH_VERSION_ADDR 0x0800C000//FLASH_Sector_3
#define FLASH_OLDAPP_ADDR 0x08010000//FLASH_Sector_4
#define FLASH_APP_ADDR 0x08080000//FLASH_Sector_8 128Kb
#define FLASH_DATA_FLAG 0x1010 //准备升级
#define FLASH_START_FLAG 0x1111 //升级完成
#define FLASH_OLD_FLAG 0x0101 //启动老程序
/***************
FLASH_Sector_0 0x0800 0000 ~ 0x0800 3FFF (16KB)--bootloader
FLASH_Sector_1 0x0800 4000 ~ 0x0800 7FFF (16KB)--呼吸心率上下限存储
FLASH_Sector_2 0x0800 8000 ~ 0x0800 BFFF (16KB)--标志位位置FLASH_DATA_FLAG_ADDR
FLASH_Sector_3 0x0800 C000 ~ 0x0800 FFFF (16KB)--版本号位置FLASH_VERSION_ADDR
FLASH_Sector_4 0x0801 0000 ~ 0x0801 FFFF (64KB)--固定程序位置FLASH_OLDAPP_ADDR
FLASH_Sector_5 0x0802 0000 ~ 0x0803 FFFF (128KB)
FLASH_Sector_6 0x0804 0000 ~ 0x0805 FFFF (128KB)
FLASH_Sector_7 0x0806 0000 ~ 0x0807 FFFF (128KB)
FLASH_Sector_8 0x0808 0000 ~ 0x0809 FFFF (128KB)--升级程序位置FLASH_APP_ADDR
FLASH_Sector_9 0x080A 0000 ~ 0x080B FFFF (128KB)
FLASH_Sector_10 0x080C 0000 ~ 0x080D FFFF (128KB)
FLASH_Sector_11 0x080E 0000 ~ 0x080F FFFF (128KB)
**************/
#endif