Hello,
I am currently using KDS 3.0.0 and can't seem to program the EEPROM Data Set Size, or the FlexNVM Partition Code locations using the program partition command. I am programming FCCOB4: 0x34 and FCCOB5: 0x05, the command executes without any errors (MGSTAT0 ,ACCERR, RDCOLERR, FPVIOL are all 0), so I am assuming the command completed correctly.
However, if I execute the Read Resource Command aligned at address 0xF8, FCCOB4 through FCCOB9 read 0xFF and FCCOBA: 0xF4 and FCCOBB: 0xF5! Any thoughts?
I would like to view the absolute address on the memory browser tab. Is the absolute address of these bytes at 0x008003FC and 0x008003FD?
Hello Jingling,
I am using an MK64FX512.
I'll give you a description of what I am doing. I have different programs that require different partitioning and rather than having it done using a programmer in our case P&E's Cyclone; I'd rather have each program perform the partitioning.
This is what I am doing. I first use the Read Resource Command (RRC) to verify that the partition values are correct or if the chip has been partitioned. If the RRC returns all 0xFF aligned at location 0x00803F8 (Data Flash 0 IFR map location), I then proceed with the Program Partition Command (PPC). I have 3 questions.
1. What I am trying to understand is why after performing the RRC are FCCOBA and FCCOBB returning with 0xF4 and 0xF5 respectively? I would expect them tho have the values 0x34 and 0x05 instead.
2. Why are FCCOBA and FCCOBB loaded with the EEPROM Data Set Size and the FlexNVM Partition Code? According to the RRC if the return bytes ar arranged in the fashion below, I would expect FCCOB7 and FCCOB6 to hold the EEPROM Data Set Size and the FlexNVM Partition Code values.
FCCOB4 Read Data [64:56]
FCCOB5 Read Data [55:48]
FCCOB6 Read Data [47:40]
FCCOB7 Read Data [39:32]
FCCOB8 Read Data [31:24]
FCCOB9 Read Data [23:16]
FCCOBA Read Data [15:8]
FCCOBB Read Data [7:0]
3. Why am I not seeing the values using the KDS memory tab at location 0x008003FC and 0x008003FD?
Thank you,
Jairo
Hi Jairo Berrior,
Now answer your 3 questions.
1, Actually the returned data of 0xF4 and 0xF5 in the Data flash 0 IFR adress 0x8003fd and 0x8003fc is correct, now let me tell you why.
As you know, the useful data to the EEPROM data set size code is just 6 bits, like the following picture:
The useful data to the FLexNVM Partition code DEPART is just 4 bits, like the following picture:
then you get EEPROM data set size in address 0x8003fd is 0xF4 , what you expect is 0x34
0xF4 = 0b 11110100
0x34 = 0b 00110100
You can find the 6 useful bits are the same, you just need to check these 6bits in EEPROM data set size, not all the byte.
You get FlexNVM partition code in address 0x8003fc is 0xF5 , what you expect is 0x05
0XF5 = 0b11110101
0x05 = 0b00000101
You still can find the 4 useful bits are the same, you just need to check these 4bits in FlexNVM partition code, not all the byte.
2. Refer to point1. Your data is correct to the useful bits.
3. Data flash 0 IFR is a 1Kbyte novolative information memory, which within the data flash 0 memory block, it is the special area, it just have the internal local address, this address just can be operation with the determined command, you can read it in the KDS memory viewer windows, because the given address is not the MCU golbal address, just the MCU local address.
Wish it helps you!
If you still have question, please contact with me!
Have a great day,
Jingjing
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Jairo Berrio,
If you want to write the EEPROM, you should make sure your chip have the flexNVM module.Just the MK64FX512xxx have the FlexNVM module, can use the EEPROM function. MK64FN1M0xxx don't have the FlexNVM module, it don't have the EEPROM function.
After make sure your chip have the flexNVM module, you should use the program partition command to partition the flash at first. More details, please refer to the reference manual :Table 29-69. Program Partition Command FCCOB Requirements
After you partition the flash, then you can write the data to the eeprom, the eeprom address is the flexRAM address. If you want to read out the data, just read the according address is OK, you don't need to use Read Resource Command. The Read Resource command is provided for the user to read data from special-purpose memory resources located within the Flash module. About the read reource select code, please refer to the reference manual:
Table 29-44. Read Resource Select Codes, it is read the IFR and version ID, not the eeprom address.
Wish it helps you!
If you still have question, please contact with me!
Have a great day,
Jingjing
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------