| 12345678910111213141516171819202122 |
- /********************************************************************************
- * File Name: remapVector.c
- * Function Describe:Remapping the vector table
- * Relate Module:
- * Explain: Hardware version is HS121
- * Writer: wjl
- * Date: 2016.10.01
- *******************************************************************************/
- #include "includes.h"
- #define VECTOR_NUMBER 48
- void AppRemap_Vector(void)
- {
- uint8_t i = 0;
- for(i = 0; i < VECTOR_NUMBER; i++)
- *((uint32_t*)(SRAM_BASE + (i << 2)))=*(__IO uint32_t*)(FLASH_APP_ADDR + (i<<2));
-
- /* Enable the SYSCFG peripheral clock*/
- RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE);
- /* Remap SRAM at 0x00000000 */
- SYSCFG_MemoryRemapConfig(SYSCFG_MemoryRemap_SRAM);
- }
|