This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello Amit,
I want to use 8 data line and 4 address lines with EPI.
I want 1 CS ,1 RD , 1 WR line. ALE not required. No MUX 8 fix data and 4 address
I have enabled EPI as follow ->>>
SysCtlPeripheralEnable(SYSCTL_PERIPH_EPI0); //Enable the peripheral
GPIOPinConfigure(GPIO_PK0_EPI0S0); // 8 DATA
GPIOPinConfigure(GPIO_PK1_EPI0S1);
. // 4 ADDRESS
.
.
.
.
GPIOPinConfigure(GPIO_PB3_EPI0S28); //RDn
GPIOPinConfigure(GPIO_PP2_EPI0S29); //WRn
GPIOPinConfigure(GPIO_PP3_EPI0S30); //CSn
GPIOPinTypeEPI(GPIO_PORTB_BASE, EPI_PORTB_PINS); // SIMILLARY I HAVE CONFIGURED ALL PINS (8 data line and 4 address 1cs 1rdn 1wrn)
EPIModeSet(EPI0_BASE, EPI_MODE_HB8);
EPIDividerSet(EPI0_BASE, 118); // 1MhZ . controller speed 120Mhz
EPIConfigHB16Set(EPI0_BASE, (EPI_HB8_MODE_ADDEMUX | EPI_HB8_WRWAIT_2 | EPI_HB8_RDWAIT_2 | EPI_HB8_CSCFG_CS ), 0); //epio30 as cs
Is there need to configure WRn RDn as differntly. If no need i want to read and write data with generating address. Which function should i use. Please tell me with any example.
Regards,
Sagar
after above configuration i used bellow function for write data at address (0x04),
EPIWorkaroundByteWrite(0x04,0x55);
But controller gets hang in above line.
What is wrong in configuration of EPI.?? Please suggest me .
Regards,
Sagar
Hello Amit ,
Yes i have corrected function EPIConfigHB8Set() from EPIConfigHB16Set .
Amit Ashara said:Secondly, the EPI Enable function has not been called
I have not found this function EPI enable. From where should i get it.
In my project i want 8 data line, 4 address line , 1 chip select , 1 read , 1 write line. I have used MUX ICs for selecting different ICs. with help of 4 address line i will enable particular IC then with help of 8 data lines i will write data on that ICs. This i want in my project.
Is it compulsory to configure "EPIAddressMapSet" function in my case?
So suggest me want is wrong in my EPI configuration. How should i write and read data with EPI.?
Regards,
Sagar
Hello Amit,
I have connected 74HC138 ic (DEMUX IC) on address line for selecting different devices chip select. From data line of EPI, i am putting data on that selected ICs.
what address i am selecting is generating on A1 A2 A3 not on A0. I am writting data in while loop, on A0 i am getting pulse high- low, high- low , this A0 pulse get high with 1st chip select to next 2nd chip select then again it become low upto 3rd chip select and so on.
In address mapping i have used
addr = (unsigned short * ) 0xA0000000; // static volatile unsigned short addr;
I want to ask one silly question -> why we are using static volatile unsigned short and not static volatile unsigned long
while(1) // HB8 no MUX
{
addr[6] = 0x30;
while( HWREG(EPI0_BASE+EPI_O_STAT) & EPI_STAT_WBUSY) {}
}
I am getting address from A1 to so on not from A0?
I tried another trial also i have used HB8 MUX configuration
while(1) // HB 8 MUX
{
addr[(6<<8)] = 0x30;
while( HWREG(EPI0_BASE+EPI_O_STAT) & EPI_STAT_WBUSY) {}
}
I am getting data from A1 only on A0 i am getting 0 always .
Regards,
Sagar