This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM263P4: Having trouble with XIP and writing to the same flash causing long delays on startup

Part Number: AM263P4
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

I'm running some simple benchmarking code on the AM263P4 running on the PROC159E2 evaluation board.

The base project is ipc_notify_echo_am236px-cc_system_freertos_nortos that has been moved into FLASH and the code has parts of it running in OCRAM and parts of it running as XIP. When the code starts, it is 100% running in OCRAM with the XIP code called later in the program execution. This is all running within CCS.

The code was running just fine and doing exactly what it was supposed to when loaded into FLASH and then allowing the board to boot from FLASH. Then it was decided to add logging to the code and that is where the problems began.

In order to allow the ability to read and write to a dedicated area of FLASH far away from any program code, Sysconfig was used create a FLASH config and the associated OSPI config. Note that I am not using LittleFS or FreeRTOS FAT for this; just the normal FLASH read and write calls. The code builds just fine, however on startup, since it starts from FLASH, there is a very long delay, on the order of 3-5 *minutes* before the program actually starts executing after it is programmed into FLASH.

If the 'Skip HW Init' flag is set, the delay goes away, but then none of the functions that would allow me to erase, read or write to FLASH work at all; they always return a failure.

Any help would be greatly appreciated.

Thanks and please have a great day. :-D