Hello Everyone,
I am using extra SDRAM on my custom made board with TM4C129X microcontroller.
As data sheet mentioned
When using the LCD with EPI to interface to external memory, the external code address
space 0x1000.0000 must be selected by programing the ECADR field to 0x1 in the EPI
Address Map (EPIADDRMAP) register at EPI offset 0x01C.
I am initializing EPI and LCD module as follow:
uint16_t *frambuffer;
void EPI_Init(void)
{
SYSCTL_RCGCEPI_R = 1;
EPI0_BAUD_R = 1;
EPI0_CFG_R = 0x00000011;
while(EPI0_STAT_R & (1<<6));
EPI0_SDRAMCFG_R = (0x3<<30)|(940<<16)|(1);
EPI0_ADDRMAP_R = 0xD<<8|0xC;
frambuffer = (uint16_t *)0x10000000;
}
void LCDInit(void)
{
SYSCTL_RCGCLCD_R = 1;
LCD0_CLKEN_R = 0x07;
LCD0_CTL_R = (5<<8)| 3;
LCD0_RASTRCTL_R = (2<<20) | (1<<7) ; //0x00800080
// LCD0_RASTRCTL_R = (3<<25) | (2<<20) | (1<<7) ; //0x00800080
LCD0_RASTRTIM0_R = (0x7<<24)|(0x7<<16)|(0x3<<10)|(49<<4);
LCD0_RASTRTIM1_R = (0x8<<24)|(0x8<<16)|(0x3<<10)|(479);
LCD0_RASTRTIM2_R = (0x1<<25)|(0x1<<24)|(0x1<<22);
LCD0_DMACTL_R = 0x00000020;
LCD0_DMABAFB0_R = (uint32_t)frambuffer;
LCD0_DMACAFB0_R = (uint32_t)frambuffer+800*480*2-1;
}
But due to some reason my code is going into FaultISR Infinity loop.
Can someone suggest me why is this happening.