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.

OMAP L138 byte swap during bootloader execution

Hello,

We are trying to set up our software to boot from SPI flash and run some code from our DDR2 memory.  We have been running from internal memory for a while, but ran out of space so needed to move some of it to the DDR2.

It works fine on the LogicPD demo board but we cannot get it to run properly on our custom board.  For some reason the bytes are being swapped.

Exerpt from the AISGen file:

58535901 (Section load command)
C0000000 (Address, destination DDR2)
00001058 (Size)
C25C0000 (Data)
00000000
447F0000
C2580000
43968000
447F0000
C2540000
43A18000

Here is what ends up in memory (at 0xC0000000):

5CC20000
00000000 
7F440000
58C20000 
96430080 
7F440000 
54C20000 
A1430080  

To read the data I simply connected with an emulator using a GEL file that only set up the memory map. At that point I can read and write data from the DDR2 reliably.

As you can see, the data bytes of every 16-bit word are swapped.  Since it works on the Demo board and we can access the DDR reliably on our custom board, we are really stumped.  Do you have any ideas what might be causing this?

Thanks,

Adam