The partition commands just follow the 'Generic Flash Command Write Sequence' command flow in the data book
1) ensure that the flash clock divider is written
2) check that CCIF flag is set
3) clear the ACCERR & PVIOL flags (do this as a single write, not bit modify operations)
4) write CCOBIX = 0
5) write the command ID to CCOBHI, 0x0F for full partition
6) write CCOBIX = 1
7) write the number of D-flash sectors you don't want to use for EEE (DFPART) to CCOB
8) write CCOBIX = 2
9) write the number of 128 word regions in the buffer RAM you want to use for EEE (DFPART) to CCOB
10) write 0x80 to FSTAT to clear the CCIF flag and launch the command
11) wait for CCIF to become set
12) check the command generated no errors (FSTAT == 0x80)
The partition sizes neet to meet the rules for DFPART and ERPART in the data book else you get an ACCERR flag.
And you really should monitor the FSTAT value following commands because the memory controller supports a lot of error checking and sometimes you launch a command and then wonder why nothing seemed to happen - for example, for most commands it checks that the CCOBIX points to the last CCOB parameter for that type of command and if it doesn't it tells you you got it wronf with an ACCERR.
The Full Partition D-flash Command (ID 0x0F) will only run in special mode and erases the D-flash before partitioning.
The normal mode Partition D-flash Command (ID 0x20) is only on xM48H mask sets and will olny work if the D-flash is fully erased in special mode with an Erase All Blocks command. (FYI, the EEE Query command is also only on the xM48H masks too).
Once the EEE is partitioned then you can run the Enable EEE command and write data to the EEE RAM and it will get backed up to the EEE NVM partition. Enable EEE command also follows the generic command flow. You can see when the data has written to the D-Flash by checking that the ETAG register == 0x0000 and the MGBUSY flag in the FSTAT register is clear.
Once the D-flash is partitioned it cannot be repartitioned in normal mode – but it can in special mode using the Full Partition D-Flash command or using the Erase All Blocks command and then the partition D-flash command.
Retrieving data ...