Hello, is it possible to get example how to use asynchronous parallel bus for ADSP-21489 processor ?
init function, and how to send data command, and how to read data from register ? (in c, not asm)
The asynchronous memory controller provides a configurable interface for up to four separate banks of memory or I/O devices. Each bank can be independently programmed with different timing parameters, enabling connection to a wide variety of memory devices including SRAM, flash, and EPROM, as well as I/O devices that interface with standard memory control lines.
Please find the attached sample code which shows how different banks can be initialized for AMI access(Bank 3 in the attached code).
The memory address that can be accessed from 4 banks are shown below (provided in the ADSP-21489 datasheet):
Bank 0 : 0x0020 0000–0x007F FFFF
Bank 1 : 0x0400 0000–0x047F FFFF
Bank 2 : 0x0800 0000–0x087F FFFF
Bank 3 : 0x0C00 0000–0x0C7F FFFF
You can also refer to the External Port chapter of the ADSP-214xx Hardware Reference Manual(HRM) to know more on how the AMI controller works.
The link for the manual is shown below:
Please let me know in case you have any further queries/doubts.
Hi, thanks for answer
When i try to run it, i get compiler errors.so i switched expresion from:
(*((volatile unsigned short *) 0xC000000)) =0xAAAA;
but i have no activity on data bus, and control lines
I tested your code and I can see that data values are getting updated at address 0xC00_0000.
Please find the attached screenshot showing the data values.
Do you see no activity on the data bus even for the code which I sent you in my previous thread?
Since this code has UART, i can see message at TX line, but nothing else on address, or data, or control lines
Can you try to remove the UART code in your project and just try to access the AMI address range first and see if you see any activity or not?
Also I would like to know how are you probing the data lines. At what end are you proving these pin?
Also can you check in the memory window that external memory address gets updated with the value written or not.
You can also try accessing some different banks as well like Bank 0, 1,2 also to check if you face similar issues even with that.
Ok, i get some activity on data bus , as well as on address and FLAG pins (CS)question remains, how can i write command/data by using 16b width bus ?this is prototype for functions
void LCD_WrCmd(unsigned int cmd)
void LCD_WrDat(unsigned int val)
Regarding “how can i write command/data by using 16b width bus”
>> Could you provide more information regarding what interface are you trying to connect to the AMI address and data lines?
I would suggest you to go through the Application Note EE-355, which provides detail information of how we interface parallel flash with SHARC processors. You can also refer to the code example present along with this application note to understand how the commands and data are sent through the AMI buses.
The link for the application note is given below:
As you can see in the code, the external data bus width has been set to 8-bits (inside AMICTL register) and then they make use of the function ‘EP_Send_8bit()’ to send the command/data to the parallel flash device.
Similar strategy can be applied at your end to interface the device.
Hi, thanks for replay.I get new dsp board so i continiu my project..
By using some one else init finaly i get sending and receiving data without any odd behavior.
*pSYSCTL |= MSEN; // Enables FLAG2 and 3 (IRQ2 and TIMEXP) as MS2 and 3
*pAMICTL3 = ( AMIEN | BW16 | PKDIS | WS1 | HC2 | AMIFLSH | PREDIS);
and sending data like this:
ok, still one thing is unclear for me. I know how to control AMI_RD, AMI_WD, but where i get RS pins (Data/command) ?, CS pin as far as i understand is memory select pin.
SRAM does not have Command/Data pin, so i should use address pin to create RS ?like 0 address is Command, and 1 is data ?
Regarding “still one thing is unclear for me. I know how to control AMI_RD, AMI_WD, but where i get RS pins (Data/command) ?, CS pin as far as i understand is memory select pin. SRAM does not have Command/Data pin, so i should use address pin to create RS ? like 0 address is Command, and 1 is data ?”
>>As you can see in the ADSP-21489 EZ-Kit board schematics on page 91, you can see how the address/data lines are available in the SRAM memory. Also the CE pin of the SRAM is connected to SRAM_CS (connected to MS3 via SW13). The link for the manual is given below:
As before, i can't found hardware RS pins. since i don't use address pins, i used that as RS pin, and using different address if i want to set data or to set registers inside SSD1963 controller.
void LCD_WriteRAM(int LCD_Reg)
(*((volatile unsigned short *) 0xC100000)) =LCD_Reg;
void LCD_WriteCom(int LCD_Reg)
(*((volatile unsigned short *) 0xC000000)) =LCD_Reg;
}And because address pin can be called as hardware, i don't have any lag
Glad to know that this works for you.
Please let me know in case you have any further queries.
Retrieving data ...