flash(4126).h 1018 B

1234567891011121314151617181920212223242526272829
  1. #ifndef _FLASH_H_
  2. #define _FLASH_H_
  3. /* includes ----------------------------------------------------------*/
  4. #include "stm32f1xx_hal.h"
  5. #include "FreeRTOS.h"
  6. #include "task.h"
  7. /* typedef -----------------------------------------------------------*/
  8. /* define ------------------------------------------------------------*/
  9. #define APP1_ADDRESS ((unsigned int)0x8002800U) // 0x8002800-0x8040C00 249k
  10. #define APP2_ADDRESS ((unsigned int)0x8040C00U) // 0x8040C00-0x807F000 249k
  11. #define PARAM_ADDRESS ((unsigned int)0x807F000U) // 0x807F000-0x80800000 4k
  12. /* macro -------------------------------------------------------------*/
  13. /* variables ---------------------------------------------------------*/
  14. /* function prototypes -----------------------------------------------*/
  15. // @brief 参数区数据读取
  16. void Read_ParamArea(void);
  17. // @brief 向量重映射
  18. void Remap_Vector_Table(void);
  19. // @brief flash按字写入
  20. HAL_StatusTypeDef FLASH_Write(uint32_t address, uint32_t *data, uint32_t length);
  21. #endif