Accessing external SPIFI flash data working when starting debug through JTAG, but not when booting directly

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

Accessing external SPIFI flash data working when starting debug through JTAG, but not when booting directly

跳至解决方案
978 次查看
thomasnielsen
Contributor II

Hi all.

I got a problem with accessing the external SPIFI flash on a custom board when booting directly, but everything works nicely when starting by running a JTAG debug session.

The system has its code in the internal flash (LPC4367s not yet encrypted) and uses an external SPIFI flash for reading a lot of configuration data.

Setup is pretty standard LPCOpen, with external flash setup in the memory editor, with the generic driver selected.

The place I experience the error is when trying to read data in the external flash through the memery mappong, doing something like this:

#define NEURAL_FLASH 0x14000000
int *numbers = (int *)NEURAL_FLASH;
int ap = numbers[0];

The code will when running from a direct boot (no JTAG attached, restarting board) fail at the last line, while when JTAG debugging, it will read the data correctly.

It is almost like the memory mapping of the external flash to 0x14000000 does not happen when booting directly.

So what am I missing?

Any help with this one will be greatly appreciated.

标签 (1)
0 项奖励
回复
1 解答
815 次查看
converse
Senior Contributor V

Have you set up the EMC correctly (or at all?) for your external flash device? I imagine it is working during debug because the debugger has done this for you

在原帖中查看解决方案

0 项奖励
回复
2 回复数
816 次查看
converse
Senior Contributor V

Have you set up the EMC correctly (or at all?) for your external flash device? I imagine it is working during debug because the debugger has done this for you

0 项奖励
回复
815 次查看
thomasnielsen
Contributor II

Hi Con Verse.

You were totally right. Thanks a lot.

I was under the asumption that setting up the driver in the memory editor would work outside dubugging too, which is not the case.

Thanks again.

0 项奖励
回复