Hi everyone,
I am having 2 problems booting my program from SD card in my custom board using VC5505.I hope you guys could help me out.
1. My program boot & executed well with a new, untouched SD card but if I copy the boot5505 bin file to some another cards (which had been formatted as FAT32 using Windows XP) then it fails to boot. The problem is similar when using the programmer.out to program to SD card. The programmer.out can write the bin file successfully to a new SD card but not a windows-formatted one.
2. I have another program which uses LCDC, MMC & ATA FAT. Everything works perfectly when I load & execute it using CCS 4.1. When I tried to boot it from SD, the LCDC works well (I can see the LCD was on) but not the MMC module. Could anyone tell me what's the differences running the code from CCS and booting using boot-loader? I guess CCS initialize something for us but I am not sure what it is.
Here is my initialization code I took from an EVM sample project:
void InitSystem(void)
{
Uint16 i;
// PLL set up from RTC
// bypass PLL
CONFIG_MSW = 0x0;
#if (PLL_100M ==1)
PLL_CNTL2 = 0x8000;
PLL_CNTL4 = 0x0000;
PLL_CNTL3 = 0x0806;
PLL_CNTL1 = 0x82FA;
#elif (PLL_12M ==1)
PLL_CNTL2 = 0x8000;
PLL_CNTL4 = 0x0200;
PLL_CNTL3 = 0x0806;
PLL_CNTL1 = 0x82ED;
#elif (PLL_98M ==1)
PLL_CNTL2 = 0x8000;
PLL_CNTL4 = 0x0000;
PLL_CNTL3 = 0x0806;
PLL_CNTL1 = 0x82ED;
#endif
while ( (PLL_CNTL3 & 0x0008) == 0);
// Switch to PLL clk
CONFIG_MSW = 0x1;
// clock gating
// enable all clocks
IDLE_PCGCR = 0;
IDLE_PCGCR_MSW = 0xFF84;
// reset peripherals
PER_RSTCOUNT = 0x02;
PER_RESET = 0x00fb;
for (i=0; i< 200; i++);
}
Any help would be highly appreciated. Thank you very much!
Joe