Eeeprom bugs in isp and bootloader

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Eeeprom bugs in isp and bootloader

1,445 次查看
raluralu
Contributor II

I have encountered two bugs with eeprom on LPC54628

1. registers RWSTATE and WSTATE are not correctly initialised (at least not as per LPC546XX data sheet (Rev. 2.8 — 8 September 2020) / chapter 11.2 / table 23 / page 102). 
This result that sometimes some bit during write are not correctly written (or read). This applies both for iap mode of operation and native EEPROM from SDK v2.1.

Bug can be reproduced just by running example for iap_eeprom on LPC54628 Expresso dev however 

Eeprom seems to work ok, when register initialisation is done accordingly.

2.  Issue is that write on page 127 (or 128 if counting starts from 1) returns error. Other page writes works ok.

I can volunteer to send patches, but I am not sure where to send them. Can someone helps me with this?

标签 (2)
0 项奖励
5 回复数

1,174 次查看
bergem
Contributor II

I'm also having issues with page 127 in the eeprom. Using i2c ISP I get error code 0x7 when attempting to write to page 127. All other pages < 127 works fine.

0 项奖励

1,422 次查看
raluralu
Contributor II

x

0 项奖励

1,434 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello raluralu,

First of all, thanks for your sharing.

And just kindly recommend you use the latest SDK_2.8.2.

About the bugs you mentioned, could you please send the project, I will test it on my side.

Thanks.

 

Regards,

Alice

0 项奖励

1,409 次查看
raluralu
Contributor II

Thank you for your response. Using SDK 2.8.2 seems to have little different results.

Simplest way to test this by using provided example.

File -> Import SDK example -> lpcxpresso54628 ->  choose sdk 2.8.2 -> next -> under driver_examples select iap_eeprom -> finish

Running this example from debugger for first time fails on my board returns error.
it prints "EEPROM Page read/Write failed" from line 84 of file source/iap_eeprom.c

Issue seems to be connected  with debugger or similar.
Applying  reset procedure stolen from eeprom example (that is non iap eeprom example)

EEPROM->CLKDIV = 0x91;
CLOCK_EnableClock(kCLOCK_Eeprom);
EEPROM->CMD = FSL_FEATURE_EEPROM_PROGRAM_CMD;
while ((EEPROM_GetInterruptStatus(EEPROM) & (uint32_t)kEEPROM_ProgramFinishInterruptEnable) == 0UL)
{
}

Solves this issue. If this code is placed before IAP_WriteEEPROMPage. (it is needed to add eeprom support from drivers)
Issue is not as much as with RWSTATE and WSTATE as i have previously report, but with initial eeprom state after reset. This might explain why i have not seen an issue after soft reset in debugger. 

Kind regards.

0 项奖励

1,392 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

OK, thanks for your sharing, I will report it to related team. thanks!

Regards,

Alice

 

0 项奖励