Hi,
I have a 1 MB SRAM interface to the EPI port that I want to initialize properly before I receive my hardware prototype. According to the documentation the following would be sufficient; however, I have seen posts on this board that indicate that the individual port pins must be initialized as well. Is the following code sufficient for the TM4C1294XL Tiva?
Here is my code:
//---------------------------------------------------------------
// EPI Setup
//---------------------------------------------------------------
// Enable the peripheral
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_EPI0);
// Set the EPI divider. <==== set EPI0_BASE
ROM_EPIDividerSet(EPI0_BASE, 0);
// Select EPI Host Bus 8-bit mode.
ROM_EPIModeSet(EPI0_BASE, EPI_MODE_HB8);
// Configure SRAM mode
// EPIConfigHB8Set - all data transfers use bits[7:0]
ROM_EPIConfigHB8Set(EPI0_BASE, EPI_HB8_MODE_ADDEMUX | EPI_HB8_WRWAIT_0
| EPI_HB8_RDWAIT_0 | EPI_HB8_CSCFG_CS, 0);
// Set the address map. Base 0x6000 0000, Using 1MB out of 16MB addr space
ROM_EPIAddressMapSet(EPI0_BASE, EPI_ADDR_RAM_SIZE_16MB | EPI_ADDR_RAM_BASE_6);
// Wait for the EPI initialization to complete.
while(HWREG(EPI0_BASE + EPI_O_STAT) & EPI_STAT_INITSEQ)
{
}
// At this point, the SRAM is accessible and available for use.
Thank you,
Joe