Thanks Senlent. That looks like it would just put some constant data into the program code where it couldn't be modified. I need to be able to modify it on occasions. I have been looking at implementing FlexRAM for quick writes, but I only get errors and can't tell what the error means. I executed this code:
if ((FTFC->FCNFG & (FTFC_FCNFG_RAMRDY_MASK + FTFC_FCNFG_EEERDY_MASK)) == FTFC_FCNFG_RAMRDY_MASK)
{
FTFC->FCCOB[0] = kSETRAMCommand;
FTFC->FCCOB[1] = kEmulateControlCode;
FTFC->FCCOB[4] = 0; //256 BYTES
FTFC->FCCOB[5] = 4;
FTFC->FSTAT |= FTFC_FSTAT_CCIF_MASK; //clear CCIF by writing 1 to it
while ((FTFC->FSTAT & FTFC_FSTAT_CCIF_MASK) == 0)
{}
}
When it completes, the FSTAT[ACCERR] bit is set which could have any of the following meanings:
Command not available in current mode/security
FlexRAM Function Control Code is not defined
FlexRAM Function Control Code is set to make the FlexRAM available for emulated
EEPROM, but FlexNVM is not partitioned for emulated EEPROM
Set if FlexRAM Function Control Code is set to 0xAA, 0x77 or 0x55 but FCNFG.[EEERDY] =0
(FlexRAM not in emulated EEPROM mode)
Set if FlexRAM is in EEPROM quick write mode, i.e. all EEPROM quick writes to the
FlexRAM have not been completed
Set if FlexRAM Function Control Code is set to make FlexRAM available for EEPROM quick
writes but the number of bytes allocated for quick write is less than 16, more than 512, or not
divisible by 4 (only 32-bit quick writes are allowed)
Set if emulated EEPROM system is in quick write mode and writes to the FlexRAM are not
32-bits