Chip in question: MK10DX256VLL7, mask 3N36B.
I'm trying to use FlexNVM/FlexRAM memories, and to configure it, one must send Program Partition Command. Only once for particular application, so I'm trying to decide whether to call it in init sequence depending on current FCFG1 register EESIZE and DEPART fields values - if they are set as expected, then I assume it's already configured. If they are not, then I do the initial configuration.
But after 'mass erase' via EzPort, I get unexpected value of FCFG1.EESIZE field == 0011, meaning 2048 bytes for EEPROM. I expect 1111 there, meaning no EEPROM.
Data flash IFR has a EESIZE field, that determines EEPROM size. Erased state should be all 1s and that value should propagate to FCFG1.
Let's assume that IFR.EESIZE gets value 3 out of mass erase. Then later reprogramming attempt shoud fail with ACCERR, according to the manual (condition is: The EEPROM data size and FlexNVM partition code bytes are not initially 0xFFFF). But it gets programmed successfully, to any valid value. Next attempt (without mass erase) to program IFR.EESIZE fails, as expected. So, it suggests that initial value (after mass erase) of IFR.EESIZE is indeed all 1s, as it allows programming, once. I can set any valid value for EESIZE and it gets propagated via FCFG1 properly. Only initial value of all 1s (out of mass erase) gets propagated to FCFG1.EESIZE incorrectly, as value == 3.
A bug, or am I missing something?