Hi,
I have a system which is running fine under debug -- both a secondary bootloader running in L3 OCMC RAM, and an app running in external DRAM. But I can't get the secondary bootloader to run out of SPI flash at power up.
SYSBOOT[4:0] is set to 11001b, so the ROM bootloader boot sequence should be SPI0->MMC0->EMAC1->UART0.
When the flash is blank, I see the ROM bootloader execute 4 short SPI bursts (presumably each is a 512 byte page) then stop. When the flash is programmed with my SBL code, then there is a longer SPI burst (approx. 44ms), which would be a reasonable amount of time to read in the SBL, given its size of 38860 bytes.
But then it apparently does not execute. The only way I can tell this is that in the current version of the SBL it will sit flashing an LED after it has finished initializing the system -- and there is no LED activity.
The first several bytes in the flash are as follows, starting at address zero and laid out as 32-bit big-endian words . .
00 00 97 D4 40 30 00 00 E5 9F F0 18 E5 1F F0 08 E5 9F F0 18 etc.
Expanding this out a bit, you can see the header followed by a fairly normal looking ARM irq_vector/instruction sequence:
0x000097D4
0x40300000
0xE59FF018
0xE51FF008
0xE59FF018
0xE51FF008
0xE51FF008
0xE51FF008
0xE51FF008
0xE51FF008
0x40300050
0x00000000
0x40300049
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x4030004F
0xE7FEE7FE
0xE7FEE7FE
0xE7FEE7FE
0xE59F002C
0xEE0C0F10
0xEE113F50
0xE383360F
0xEE013F50
0xE3A03000
0xE3A00101
0xEEE80A10
0xEE073F95
0xE59FA00C
0xE1A0E00F
0xE12FFF1A
0xE24FF008
etc.
The SBL is being loaded at the bottom L3 OCMC RAM at address 0x40300000. It does not exceed the available limit of 0x4030B800 as it is shown in the Initialization chapter of the TRM.
The TRM also claims that you can use the SRAM area between 0x402F0400 and 0x40300000, but I have not been able to successfully link and debug in that area. However that is not a major issue at this time.
Can anyone see what the problem is here? I must be doing something wrong but I just can't see it. I did try going back to little-endian for the body of the code, but that didn't work either!
My setup is as follows:
Custom PCB
AM3352BZCZ30
CCS Version: 6.1.2.00015
bios_6_45_01_29
pdk_am335x_1_0_3
GNU v4.9.3 (Linaro)
Win 7 64-bit
Thanks,
GerryL