J-Link / J-Trace (UM08001) © 2004-2017 SEGGER Microcontroller GmbH & Co. KG
395
// Check current data flash & EEPROM config
//
v = FCCOB6; // IFR offset 0xFD
if (v != 0xFF) { // EEPROM data set size already configured?
return;
}
v = FCCOB7; // IFR offset 0xFC
if (v != 0xFF) { // FlexNVM partition code already configured?
return;
}
//
// Configure EEPROM size and data flash size
// via the program partition command
//
FCCOB0 = 0x80; // Program partition
FCCOB4 = 0x3F; // EEPROM data size code: 0 KB EEPROM
FCCOB5 = 0x00; // FlexNVM partition code: 256 KB data flash
FSTAT = 0x80; // Start command execution
while((FSTAT & 0x80) == 0); // Wait until flash controller has finished
}