LPC5502 crash on FLASH_Read

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

LPC5502 crash on FLASH_Read

462 次查看
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 回复数

427 次查看
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 项奖励
回复

437 次查看
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 项奖励
回复