Kinetis (K20) EEPROM Partition Question.

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Kinetis (K20) EEPROM Partition Question.

1,262件の閲覧回数
ZQSu
Contributor I

Hi Everyone.

I'm trying to use K20 FlexMEM / FlexRAM to implement a EEPROM and experiensing some EEPROM partition issue. The EEPROM partition routine can only be executed in debug mode and after first running, it automatic stops running. Then after reset procedure, it runs well. After EEPROM partition in debug mode, the board runs very well after power-on. If it is just burned in all code and then directly power-on again, it will not work. Looks like it will always in EEPROM partition routine.

 

I noticed that the EEPROM partition routine must be executed in RAM. The issue is how I can let this routine is copied into RAM after power-on and is executed from RAM. I tried some #pragma and modified link file. But this issue is still there: The routine is always in P flash.

 

Is there any one here who have solved the EEPROM partition ?

 

Thanks for your reply.

0 件の賞賛
返信
2 返答(返信)

507件の閲覧回数
lander
Contributor IV

Did you figure out your problem?  If so, please let me know how!

Thank you,

Liz

0 件の賞賛
返信

507件の閲覧回数
Briwal
Contributor I

If you are using IAR then use the __ramfunc ojecct attribute. Then IAR will copy the function to RAM for you. The problem is that it will always take up RAM space but my flash function is quite small ~100 bytes.

 

_ _ramfunc int FlashPage(char * data, char * page);
I was allocating RAM, copying the code and calling it manually, then freeing the RAM but the __ramfunc attribute is a lot easier.
0 件の賞賛
返信