Hi at all,
Can anyone tell me what I to do with the eesplit bits in the eeprom data set size register? In the past, I have
worked with a MK10DX128VLH7 cpu and there weren't these bits?! So do I have to pay attention to these bits?
Especially, when I would like to read and write the EEPROM data?
I only found this description:
Well but what can I do and how can I use the different subsections of the eeprom?
Thanks
Pascal
Solved! Go to Solution.
Hi Pascal,
If you want to partition the EEPROM, you can't partition A and B independently, because when you are use the EEPROM data size code, you will partition the size of subsystem A and B at the same time.
You can refer to the table 28-70. valid eeprom data set size codes in our reference manual K12P64M50SF4RM.PDF, the reference manual link is :
http://cache.freescale.com/files/32bit/doc/data_sheet/K12P64M50SF4.pdf?fasp=1&WT_TYPE=Data Sheets&WT_VENDOR=FREESCALE&WT_FILE_FORMAT=pdf&WT_ASSET=Documentation
But you can use subsystem A and subsystem B independently after you do the partition, because the address of subsystem A and subsystem B is your EEPROM's address in fexRAM.
For example, if you select FCCOBE[EEESPLIT]=10, FCCOB4[EEESIZE]=0X09, then your EEPROM data set size(Bytes) subsystem A+B =16+16.
Your eeprom address is from 0x1400_0000-0x1400_001f, your subsystem A is from 0x1400_0000-0x1400_000f, subsyste B is from 0x1400_0010-0x1400_001f.
When you want to swith from A to B, just change the address.
Wish my answer useful to you!
If you still have quesiton, please contact me!
Have a great day,
(Jingjing)
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Pasal Schroeer,
Thank you for your question in our community!
Could you tell me the full name chip which you are used now?
EEESPLIT bits combine with EEESIZE bits is used to partition the eeprom data size.
Take K60 100M chip as an example, valid eeprom data set size codes is like following:
It is different with the MK10DX128VLH7, MK10DX128VLH7's eeprom data size code is like following:
FCCOB[5:4]=11 in K10 is according to the FCCOB[EESPLIT] in K60 100M.
If you want to partition the K60 100m eeprom , you must pay attention to the eesplits, it is very important to partition the eeprom. Your subsystem A and B is the EEPROM partition A and EEPROM partition B, EEPROM partition A+ EEPROM partition B is your real EEPROM's size.
Please give me your full name of your chip, I will give you a reference code.
Waiting for your reply!
Have a great day,
(Jingjing)
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thanks for your answer Jingjing,
I'm using the MK12DX128VLH5 now.
Am I right when I say: "I can use partition A and B independently of each other?!"
So my only question is how to switch from one partition to the other? Or are there
different address spaces?
Thanks
Pascal
Hi Pascal,
If you want to partition the EEPROM, you can't partition A and B independently, because when you are use the EEPROM data size code, you will partition the size of subsystem A and B at the same time.
You can refer to the table 28-70. valid eeprom data set size codes in our reference manual K12P64M50SF4RM.PDF, the reference manual link is :
http://cache.freescale.com/files/32bit/doc/data_sheet/K12P64M50SF4.pdf?fasp=1&WT_TYPE=Data Sheets&WT_VENDOR=FREESCALE&WT_FILE_FORMAT=pdf&WT_ASSET=Documentation
But you can use subsystem A and subsystem B independently after you do the partition, because the address of subsystem A and subsystem B is your EEPROM's address in fexRAM.
For example, if you select FCCOBE[EEESPLIT]=10, FCCOB4[EEESIZE]=0X09, then your EEPROM data set size(Bytes) subsystem A+B =16+16.
Your eeprom address is from 0x1400_0000-0x1400_001f, your subsystem A is from 0x1400_0000-0x1400_000f, subsyste B is from 0x1400_0010-0x1400_001f.
When you want to swith from A to B, just change the address.
Wish my answer useful to you!
If you still have quesiton, please contact me!
Have a great day,
(Jingjing)
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Jingjing,
Thanks a lot! Now I have understood what to do!
Pascal
Btw. It seems that you do have a lot of knowledge in partitioning and using the flexNvm. Please look at this topic Strange behaviour of the Advanced Programming Options
Because of this behavior it isn't possible for me to use the internal flash / eeprom because every time when I debug my device, all stored data are deleted by the mass erase.
Maybe you do have an idea how to fix this problem! That were very nice.
Thanks Pascal
Hi Pacal,
I will help you to check your another quesiton later.
But if you do mass erase, the data will really be deleted( including the eeprom partition), it is correct.
If you don't want to erase the data and the eeprom partition, you don't need to do mass erase every time when you want to update your code.
Wish it helps you!
Jingjing
Yes, and because of this I would like to do some settings in the program advanced settings. There
I can manage if the device must be partition every time and I can choose some areas
which will never be erased (flash / eeprom sectors). In my other devices it works but
at this one MK10DX128VLH7 it doesn't.
Thanks
Pascal
Actually, you can use the code to identify whether your chip is partitioned, just like following:
if ((SIM_FCFG1 & SIM_FCFG1_DEPART(0xF)) != 0x00000F00) | |
{ | |
printf("\nDevice is already partitioned.\n"); | |
return 0; | |
} |
if it is not partitoned, then you can do the partition code, you don't need to mass erase the chip, if you do the mass earse, your chip should partition again.
Regards,
Jingjing
Yes, I do have such an if statement before partitioning the device.
My question is, how can I force the debugger not to do the mass erase?
Because if I debug my device, I haven't got any chance to keep the old
partition.
Only because of this, I tried to change the settings in the advanced program settings :smileywink:
Do you have an idea how to delete the mass erase command before debugging, or how
to prevent the flash and eeprom ranges from mass erase?
Thanks
Pascal
Hi Pascal,
That's very easy, just don't click the hook in the debug configuration, please see the following picture:
after that click OK, then your code will not be mass earse every time when you download your code.
Wish it helps you!
If you still have question, please let me know!
Jingjing
Thanks for this description but the problem keeps the same. When I press the apply button
to confirm these settings, I'm not able to debug.
But I have good news! Yesterday I found a way to work with this CodeWarrior bug.
If you are interested in the solution please look at this topic:
Strange behaviour of the Advanced Programming Options
Thanks a lot for your help! Now I'm waiting for the freescale CodeWarrior
developers. Maybe they will find a bugfix.
Pascal
Hi Pascal,
Thank you for your another solutions sharing, I already see it this morning, that is really a good news.
But I don't choose the always mass earse button in the project, it works OK, I already try it.
My test platform is FRDM_K20D50M, the attached is my project , If you have interest, you can test it again.
Wish it hleps you!
Regards,
Jingjing
Hi Jingjing,
Yes my FRDM_K20D50M board works fine, too :smileywink: but the board works with the MK20DX128VLH5 and not with the MK10/20DX128VLH7 cpu.
So if you change the cpu there will be the same fault like in my application :smileywink: But thanks for trying it!
Pascal
Hi Pascal,
I am sorry, I don't have the MK10/20DX128VLH7 board:smileysad:, I just have our TWR-K20D72m, the chip is PK20DX256VLL7.
But I create a project for MK10DX128VLH7, this project works ok on my TWR-K20D72M, I don't know whether it works on MK10DX128VLH7 or not, Yon can use my project to test it:smileyhappy: .
After you test, please give me your result, thank you!
Regards,
Jingjing
Hey Jingjing,
sorry for my late answer but I was on holiday last week :smileywink: I have
tried your program, but it doesn't work...
Do you know what the CW developers say to this problem? I have
got the message, that my error request is closed right now?! So
is the whole problem closed or only my request?
Thanks
Pascal
Hi Pascal,
I find the SR number in your another topic Strange behaviour of the Advanced Programming Options
From the SR, our colleague already help you report the bug to CW developer, I think this bug will be updated in our next CW version.
Thank you for your information.
Best regards,
Jingjing
You are welcome!
If you still have quesiton when you use the eerpom, you can let me know, I will help you!
Best Regards,
Jingjing