Hello,
I have a working code which uses LCD display driven by DMA controller. Everything works fine when I run the code through JTAG. If I boot the code from SDCard then the LCD DMA is not working and I get only blank screen. The rest of the code is executing fine in the background.
I'm not using any GEL files when downloading code using JTAG so that shouldn't make a difference. All the init I do is in the main().
What am I doing wrong?
Here is my init routine for the PLL and peripheral clocks:
void InitSystem(void)
{
#define PLL_CNTL1 *(ioport volatile unsigned *)0x1C20 // PLL Control Register #1
#define PLL_CNTL2 *(ioport volatile unsigned *)0x1C21 // PLL Control Register #2
#define PLL_CNTL3 *(ioport volatile unsigned *)0x1C22 // PLL Control Register #3
#define PLL_CNTL4 *(ioport volatile unsigned *)0x1C23 // PLL Control Register #4
#define USBSCR *(ioport volatile unsigned *)0x1C32 // USB system control register
Uint16 i;
// PLL set up from RTC
// bypass PLL
*CLK_CONFIG_MSW_ADDR = 0x0;
PLL_CNTL2 = 0x8000;
PLL_CNTL4 = 0x0202;
PLL_CNTL3 = 0x0806;
PLL_CNTL1 = 0x8E4A;
while ( (PLL_CNTL3 & 0x0008) == 0);
// Switch to PLL clk
*CLK_CONFIG_MSW_ADDR = 0x1;
// clock gating
*IDLE_PCGCRL_ADDR = 0x4321;
// power down USB peripherals
USBSCR = 0x0044;
// reset peripherals
*PER_RSTCOUNT_ADDR = 0x0020;
*PER_RESET_ADDR = 0x00BF;
for (i=0; i< 200; i++);
}