LPC5502 crash on FLASH_Read

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

LPC5502 crash on FLASH_Read

453件の閲覧回数
sigmeh
Contributor I

On an LPC5502 I try to read 512 bytes from the flash at address 0xF800. This works most of the time but sometimes the FLASH_Read function does not return but either the controller restarts itself or it jumps to 0xdeadbeee.

Watchdog is disabled, FLASH_Init returns with success. There seems to be also a timing involved, because if I put debug output, it does not happen that often anymore. Interrupts are off during the read.

Is it necessary to wait after init or what could be the reason for that?

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

418件の閲覧回数
sigmeh
Contributor I

Does that mean, that the return of FLASH_Init is not enough? How can I be sure it is completed?

However, I changed the FLASH_Read to memcpy which seems to work stable (no crash after a few thousand reads, before it was more or less for sure with 10 reads or so).

0 件の賞賛
返信

428件の閲覧回数
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @sigmeh,

Yes, it is important to make sure the flash initialization function is fully completed before trying to access any flash addresses.

BR,
Edwin.

0 件の賞賛
返信