5xx-超出64 k地址的flash 读和写和segment A 的读写理解
2. 程序:
//****************************************************************************** //
// MSP430F5438A // ----------------- // /|\| XIN|- // | | | // --|RST XOUT|- // | | //
// TEST FLASH.
// Function: Beyond the range of 64kb, reading and writing. // segment A reading and writing. // segment C reading and writing. // Copy segment C to D. // 2013.7
// IAR Embedded Workbench v5.30
//******************************************************************************
#include <msp430.h>
char value; // 8-bit value to write to seg C unsigned char TEM_data[256];
// Function prototypes
void write_SegC(char value); void copy_C2D(void); void write_SegA(char value);
void write_Seg_1(char value); //超过0xFFFF的段写函数 void Read_Flash(unsigned int NUM);
int main(void) {
WDTCTL = WDTPW+WDTHOLD; // Stop WDT
value = 10; // initialize value
write_SegC(value); // Write segment C, increment value write_SegA(value);
value = 1;