AnsweredAssumed Answered

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

Question asked by Thomas Nielsen on Apr 23, 2017
Latest reply on Apr 24, 2017 by Thomas Nielsen

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.

Outcomes