EEPROM use with processor expert and K20

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

EEPROM use with processor expert and K20

Jump to solution
6,580 Views
night
Contributor II

Hello,

I'm trying to use Processor Expert for work with "embebed" EEProm in a Kinetis K20DX256 microcontroller. Processor Expert initializes the memory map (I use, for example, 1 KB of EEPROM and 16 KB of D-Flash.

The methods given by PE works fine with P-Flash but it doesn't work with EEPROM address. I need work with this memory. How can I do it? It is possible?

I have Code Warrrior 10.2 and Processor Expert for MCU Version 5.3.0.

Thank you very much.

Labels (1)
Tags (2)
0 Kudos
Reply
1 Solution
2,361 Views
vfilip
NXP Employee
NXP Employee

Hello,

it´s OK. However this is misunderstanding. You cannot use the Flash_LDD component to write into EEE area. You can use for example the code below:

*(word*)0x14000000 = 0xAA;

Please do not miss to check "3.3.1 EEE writes"/"3.3.2 EEE reads" sections in the AN4284 for details on flag checking during writes/reads.

Regarding missing option in debugger. What version of CW do you use? Could you please try to run debugger in the CW V10.3 beta2?

In case it will not help please provide a demonstration project in order to analyze it.

best regards

Vojtech Filip

Processor Expert Support Team


View solution in original post

0 Kudos
Reply
5 Replies
2,361 Views
vfilip
NXP Employee
NXP Employee

Hello,

1st: Tell the Flash_LDD driver the size of EEPROM and FLASH using properties in CPU component. (Detail of CPU settings is attached)

2nd: Set corresponding size in debugger. (Detail of setting is attached)

You can find also some details in the following application note: AN4282.

best regards

Vojtech Filip

Processor Expert Support Team


2,361 Views
night
Contributor II

Dear Vojtech Filip,

thank you for your answer. I do all that you said, but I have de same problem!

I configure the memory with processor expert (with the configuration present in 'memory.png'). The CPU configuration is the same (cpu.png). After I configure the size in the debugger, but I can only configure FLASH or RAM memory (EEPROM doesn't appears like you). The code used by me here is '3402' (32 Kb of EEPROM data size and 16Kb/16Kb FlexNVM partition code). I tried it with another codes with the same result.

Finally, when I use the methods of the memory (like NAME_EraseBlock or NAME_Write) on the 0x14000000 adress (the EEPROM adress) the method returns a error with code 137 = ERR_PARAM_ADRESS. I only can access to 0x10000000 or more (the D-FLASH partition).

Thank you very much and sorry.

Best regards.

Miguel.

Memory.pngcpu.png

0 Kudos
Reply
2,362 Views
vfilip
NXP Employee
NXP Employee

Hello,

it´s OK. However this is misunderstanding. You cannot use the Flash_LDD component to write into EEE area. You can use for example the code below:

*(word*)0x14000000 = 0xAA;

Please do not miss to check "3.3.1 EEE writes"/"3.3.2 EEE reads" sections in the AN4284 for details on flag checking during writes/reads.

Regarding missing option in debugger. What version of CW do you use? Could you please try to run debugger in the CW V10.3 beta2?

In case it will not help please provide a demonstration project in order to analyze it.

best regards

Vojtech Filip

Processor Expert Support Team


0 Kudos
Reply
2,361 Views
george2
Contributor I

Hello,

I have a project built with PE component, I  am using  CW 10.4 with a P&E Universal Debugger

I am trying to use the EEPROM in a K20DX256. I have set the Flex NVM Settings in the Flash Memory Organization.

The Read & Write uses the method you described above (*(word*)0x14000000 = 0xAA).

1. The K20 had been previously partitioned

2. The project is set up to run from flash

3. Mass Erase the processor and run the debugger.

4. The project code executes a partition command.

  The result from the partition command indicates a partition exists.
  When a read or write to the EEPROM area is attempted, the processor hangs.

It appears that the NVM is not set up properly. Any idea?

Best Regards,

George

0 Kudos
Reply
2,361 Views
night
Contributor II

Ok, thanks for the answer. I will use PE for the partition and traditional C directives for the use with eeprom memory.

Best regards.

MIguel Ángel.

0 Kudos
Reply