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

ソリューションへジャンプ
888件の閲覧回数
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 解決策
725件の閲覧回数
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 返答(返信)
726件の閲覧回数
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 件の賞賛
725件の閲覧回数
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 件の賞賛