At what addresses is EEPROM backup located in K60FX512? Are the backups for two subsystems at adjacent addresses or is there one per block?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

At what addresses is EEPROM backup located in K60FX512? Are the backups for two subsystems at adjacent addresses or is there one per block?

Jump to solution
1,646 Views
dmitriyc
Contributor III

See Flash block question on MK60FN1M0VLQ12? and more recently  What is the flash block size in MK60FX512 (and similar K60)? 512K or 256K?​ for discussion of what the work "block" means.

Now for the actual question. Looking at the FlexNVM EEPROM application note AN4282, figure 2-7 it looks like the two subsystem EEPROM backups partitions live on the same block at adjacent addresses. On page 14, section 3.3 it actually states this in words "the EEE space is allocated starting at the beginning of the FlexRAM... up to programmed EEE size".

pastedImage_3.png

However, I am not sure whether that application note had the K60 in mind, since the K60FX512 reference manual (K60P144M150SF3RM ) shows this diagram on page 779, figure 30-32.

pastedImage_4.png

The above seems to imply that each of the two subsystems has its backup at the bottom of a 256K block, while that application note as I interpret it says that the EEE backup sections for both subsystems are adjacent and contiguous at the bottom of the combined 512K FlexNVM block, starting at 0x10000000 and continuing up to the total EEE backup size for both subsystems.

Which is correct?

Labels (1)
0 Kudos
1 Solution
1,067 Views
DavidS
NXP Employee
NXP Employee

The Table 30-71 in K60P144M150SF3RM Rev. 3 of the Reference Manual is wrong and should be:

ScreenHunter_169 Aug. 04 14.56.gif

The Documentation people know of this (now) and if you happen to have the older Rev. 2 it was correct.

Also note in the Figure 30-32 in top posts, yes there are blocks 0 and 1 but they are really interleaved to for one Data Flash Block so your Data Flash size picked will start at 0x1000_0000 and go to the size you picked sequentially, the rest of the flash space is for EEPROM backup.

Regards,

David

View solution in original post

9 Replies
1,067 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

I think you misunderstand the AN4282 section  3.3 Reading and Writing the EEE, which doesn't means the EEE backup address is  allocated starting at the beginning of the FlexRAM. In fact, if customer want to access the EEE data, the FlexRAM is the only entry.

Customer need to visit FlexRAM related address to read the EEE data, and write data to FlexRAM related address.

If customer set the EEE memory size to 1K, that means customer can only access FlexRAM memory range from 0x1400_0000 to 0x1400_0400, the above 0x1400_0401 to 0x1400_1000 could not be accessed.

Wish it helps.


Have a great day,
Ma Hui

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
1,067 Views
dmitriyc
Contributor III

Hi,

The way I understand the documentation (Section 30.1.3 of Nov 2014 K60P144M150SF3RM), FlexNVM is the flash memory region that can be allocated/partitioned either as data or EEE backup.

I understand about the FlexRAM part and how to access the EEE, but I am asking about where the remaining flash memory (FlexNVM allocated as D-flash) is. I will access the EEE contents through FlexRAM as specified, but I also need access to all of the remaining D-flash, and therefore I need to know which addresses in FlexNVM/D-Flash are unavailable for use because they are allocated for EEE backup, and which addresses in FlexNVM/D-flash I can use for other purposes by manually writing to them using the FTFE module.

Hope that clears it up.

Thanks,

Dmitriy

0 Kudos
1,067 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

Please check below picture about K60FX512 device FlexNVM address range:

pastedImage_0.png

The K60FX512 device FlexNVM size is 512KB, when customer using FlexNVM split to EEE backup memory and data flash left memory.

The Data Flash start address does not change, still be 0x1000_0000, while the size is based on FlexNVM partition code.

For example if FlexNVM partition code set EEE backup memory is 256KB, the Data Flash start address at 0x1000_0000

Data flash memory range from 0x1000_0000 to 0x1003_FFFF (256KB).

Wish it helps.


Have a great day,
Ma Hui

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
1,067 Views
dmitriyc
Contributor III

Hi,

OK, let's talk about a concrete case since generalities seem to be too vague to get to my real question.

I am using an MK60FX512VLQ15 microcontroller.

I want a 4096 byte EEPROM. I know EEPROM data will be available at the lower-numbered 4096 addresses in FlexRAM, starting at 0x1400_0000 ending at 0x1400_1000.

I want to use 128K of the total 512K of FlexNVM as EEPROM backup (E-FLASH in ref manual terminology), and use the remaining 384K for regular flash data storage writable using the FTFE module and accessible in some part of the 0x1000_0000_0x1007_FFFF address range (D-FLASH in ref manual terminology).

I look at table 30-71 in K60P144M150SF3RM.pdf, Rev. 3, November 2014. The numbers there do not add to 512K. Why? I tried to address this in K60 FlexNVM Set Partition but got no concrete answer so far. Note that in an older version of that reference manual, the numbers did add up to 512K, see the linked forum thread. Maybe the EEE backup allocation is per 256K block? Nothing explicitly states that. PEx follows the behavior of the old table posted by kerryzhou​ in K60 FlexNVM Set Partition .

pastedImage_0.png

Since I do not know what the latest table 30-71 is trying to say with numbers that do not add up 512K when there is 512K FlexNVM on the chip, I decide to go with the old table and current PEx (Processor Expert) behavior.

I get the following configuration:

FCCOB5[3:0]:DEPART = 0b0101

FCCOB4[5:4]:EEESPLIT = 0b11

FCCOB4[3:0]:EEESIZE = 0x1

Great. I now have 4096K of EEPROM. But which specific addresses are still available as D-flash? Given the documentation I've seen so far, there are three possible cases, as illustrated in the following figures. Which is it? CASE A? CASE B? Or CASE C? Or something else?

pastedImage_4.png

----------------------------------------------------------------------------------------------------------------------------------

pastedImage_5.png

-------------------------------------------------------------------------------------------------------------------------------

pastedImage_6.png

0 Kudos
1,067 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

I am checking with Kinetis product team about partition code issue.

I will go back to this thread, when there with any feedback.

Thank you for the patience.


Have a great day,
Ma Hui

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,068 Views
DavidS
NXP Employee
NXP Employee

The Table 30-71 in K60P144M150SF3RM Rev. 3 of the Reference Manual is wrong and should be:

ScreenHunter_169 Aug. 04 14.56.gif

The Documentation people know of this (now) and if you happen to have the older Rev. 2 it was correct.

Also note in the Figure 30-32 in top posts, yes there are blocks 0 and 1 but they are really interleaved to for one Data Flash Block so your Data Flash size picked will start at 0x1000_0000 and go to the size you picked sequentially, the rest of the flash space is for EEPROM backup.

Regards,

David

1,067 Views
dmitriyc
Contributor III

Thank you, that makes sense. I think that's case A on my diagram, and happens to be the most straightforward and intuitive thing to do.

Are 4096-byte sector and 8-byte phrase still the minimum erase and write units, respectively, for the 512K chips?

I would guess interleaving (depending on how it's done) might have an effect on write/erase size, but that's probably taken into account and transparent to the user...

If you interleave the 4096-byte sectors it would make sense that you can still block-erase 256K and sector-erase 4K regardless of whether there are 2 interleaved blocks or a single block. Is that close to what actually happens? (asking purely out of curiosity)

0 Kudos
1,067 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

I got the confirmation, the old version reference manual with the correct FlexNVM partition codes.

You are right, for the 512KB Flash chip, 4096-byte sector and 8-byte phrase still the minimum erase and write units.

From the user aspect, the FlexNVM data flash range is address contiguous and operation as normal, although it is interleaved.

Wish it helps.


Have a great day,
Ma Hui

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,067 Views
yasuhikokoumoto
Senior Contributor I

Hello Dmitriy,

for each case which were mentioned by you, I can see the EEE backup area is allocated from the bottom of the FlexNVM.

Best regards.

Yasuhiko Koumoto.

0 Kudos