EEPROM write problems with LPCOpen on the LPC1857

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

EEPROM write problems with LPCOpen on the LPC1857

1,191件の閲覧回数
christianneube1
Contributor I

I have a problem with the wait states of the internal EEPROM of the LPC1857 and the LPCOpen library.

Till now I never had a problem, but now I had many devices which could not write to the EEPROM in the release version, the debug version was working fine.

I traced the problem to the wait states of the internal EEPROM of the LPC1857 and on the way found out that in the function "Chip_EEPROM_Init" the function "setWaitState" gets called and there some magic values get written into the wait states registers. With these values the EEPROM wont work with many processor here. But as it sometimes work, it seems to be a timing problem.

I commented out the call to "setWaitState" and now it seems to work with all devices, but how can I be sure?

So where do these magic values come from? Why are the values so small compared to the values which are in the registers after reset? Why does no other have this problem?

ラベル(2)
0 件の賞賛
返信
3 返答(返信)

861件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi Christian Neubert 

Thank you for your interest in NXP Semiconductor products and 
for the opportunity to serve you.
I was wondering if you can describe the type of circumstance which trigger the issue, as the issue doesn't happen during my testing.

Have a great day,
TIC

 

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

0 件の賞賛
返信

861件の閲覧回数
christianneube1
Contributor I

Hi,

I´m not able to tell you the right circumstances, because I just found the problem to appear on some Hardware, but not all and the CPUs are all from the same week (triggering the problem and not triggering the problem).

As I´ve written, the problem are the wait states of the eeprom. In the LPCOpen version for the LPC1776 (which I´m also using and so needed to check if the problem is there too) is the code correct and also very good because it calculates the wait states with help of the CPU frequency. For the LPC1776 the manual is also right and also way better written and with more details.

0 件の賞賛
返信

861件の閲覧回数
christianneube1
Contributor I

The manual of the LPC1857 Needs be more precise on the EEPROM chapter and the calculation of the wait states. After some long time of searching I found that I need the times from the family manual. But there is a documentation error, the values for RPHASE1 and RPHASE2 need to be swapped and then it is correct.

Also the code in the LPCOpen for setting the wait states is wrong (these magic values).

0 件の賞賛
返信