1264 views|0 replies

3836

Posts

19

Resources
The OP
 

MSP430FR5969 Remote Upgrade [Copy link]

MSP430 remote upgrade function: Based on 1. Off-chip EEPROM (if the on-chip flash is large enough, it can also be used) 2. RF communication 3. Host computer software (transfer upgrade files) Summary: 1. The program always starts from the reset interrupt vector to address the entry. The interrupt vector is the storage unit that stores the entry address of the interrupt function after each interrupt trigger is satisfied. According to the data sheet, the interrupt vectors are located in the address range 0FFFFh to 0FF80h, for a maximum of 64 interrupt sources. The default interrupt vector position is 0XFF80~0XFFFF, and the length is 0x80. The reset vector is defined in the header file of MSP430FR5969 as #define RESET_VECTOR (55 * 2u) /* 0xFFFE Reset [Highest Priority] */ The default value 0XFFFE~0XFFFF These two bytes are the reset interrupt vector, which stores the start address of the main function in FLASH. If the main function is saved in P(CODE)CODE=4400-4A00, then 0X00 is saved in 0XFFFE and 0X44 is saved in 0XFFFF. After the system is reset, it will go to 0XFFFE, 0XFFFF to find the entry address of the main function. The running addresses of other interrupt functions are also saved in the corresponding vectors. When the conditions for triggering the interrupt are met, the program will address the entry address of the interrupt function according to the address pointed to by the interrupt vector. The project is created and a link file (.xcl file) is generated. The file defines the memory division, the CODE code segment storage location, and the default value of the interrupt vector table from 0XFF80 to 0XFFFF as -Z(CONST)SIGNATURE=FF80-FF8F-Z(CONST)JTAGSIGNATURE=FF80-FF83-Z(CONST)BSLSIGNATURE=FF84-FF87-Z(CONST)IPESIGNATURE=FF88-FF8F-Z(CODE)INTVEC=FF90-FFFF-Z(CODE)RESET=FFFE-FFFF 2. To perform remote file upgrade, the code needs to be divided into two sections: BOOT and application APP. If there is an upgrade file, the file is received in the application and stored in the off-chip epprom, and then BOOT is used to move the file to the application area. 3. As mentioned above, the program always starts from the interrupt vector table. If there are two codes in the memory (BOOT and application APP), their interrupt vectors cannot point to the same position, which means that the link file needs to be modified. We set the startup position of the BOOT code to the default value, and modify the storage position of the startup area and code area of the application. BOOT link file -P(CODE)CODE=4400-4A00-Z(CODE)CODE_PAD// ---------------------------// Constant data//-Z(CONST)DATA20_C,DATA20_ID,CODE_ID=4400-4A00,// -------------------------------------// Signature memory and interrupt vectors//-Z(CONST)SIGNATURE=FF80-FF8F-Z(CONST)JTAGSIGNATURE=FF80-FF83-Z(CONST)BSLSIGNATURE=FF84-FF87-Z(CONST)IPESIGNATURE=FF88-FF8F-Z(CODE)INTVEC=FF90-FFFF-Z(CODE)RESET=FFFE-FFFF application link file -P(CODE) CODE=5000-FE7F,10000-13FFF-Z(CODE)CODE_PAD// -----------------------------// Constant data//-Z(CONST)DATA20_C,DATA20_ID,CODE_ID=5000-FE7F,10040-13FFF// ------------------------------------------// Signature memory and interrupt vectors//-Z(CONST)SIGNATURE=FE80-FE8F-Z(CONST)JTAGSIGNATURE=FE80-FE83-Z(CONST)BSLSIGNATURE=FE84-FE87-Z(CONST)IPESIGNATURE=FE88-FE8F-Z(CODE)INTVEC=FE90-FEFF-Z(CODE)RESET=FEFE-FEFF The expression is that the BOOT application code storage location starts from 0X4400, the interrupt vector default application code storage location starts from 0X5000, and the interrupt vector is modified from 0XFE80~0XFEFF---------------------This article comes from lnwechag's CSDN blog. For the full text address, please click: https://blog.csdn.net/lnwechag/a ... 581?utm_source=copy

This post is from Microcontroller MCU
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list