Hi,
Some background information first. With regards to EZ-USB FX2(128pin), I am limited to using external parallel memory to store my program due to requirements. As such, I need to use EA=1 mode (as opposed to using the "normal" EA=0 mode with serial EEPROM).
On my board, I am pulling EZ-USB CS# to PROM CE#, EZ-USB OE# to PROM OE# (the respective address and data lines are connected too). The PROM I am using is AT27LV512A.
When compiling the HEX code, one of the settings I have tried for Target Options is as below but it dosen't seem to work. When plugged into a USB host, it is not able to detect the USB device and only shows up as an unknown device.
Off Chip Code Memory EPROM start : 0x0000, 0x3D00 size
Off Chip Xdata Memory RAM start : 0xE000, 0x0200 size RAM start : 0xE400, 0x1C00 size
Anyone has any clue whether the settings are correct? Or is there some other implementation that I have to make?
Rgds
"I need to use EA=1 mode... On my board, I am pulling EZ-USB CS# to PROM CE#, EZ-USB OE# to PROM OE# (the respective address and data lines are connected too). The PROM I am using is AT27LV512A."
This connection is better.
AT27LV512A FX2(LP) /CE -- fixed to low /OE -- PSEN# Address -- A[15..0] Output -- D[7..0]
When the PROM /CE is driven by the EZ-USB CS#, the timing is tight. PSEN# is specific to code memory access. It's better than OE#.
AT27LV512A works well for 12MHz and 24MHz SYSCLK. But for 48MHz, it's access speed is a little slower than required.
In above connection, the access to the code memory is completely split from data memory access. Then, you can overlap these address range. code memory: 0x0000 - 0xFFFF (full PROM) data memory: 0x0000 - 0xFFFF (but limited by RAM existence, actually)
If you want to erase and write the AT27LV512A directly using the EZ-USB chip, extra connection is required.
Tsuneo
I have tried the suggested but still can't seem to work. The EZ-USB controller part I am using is CY7C68013A. I have attached my Target Options below:
Xtal: 24Mhz Memory Model: Small Code Rom Size: Large Operating System: None
Use On-Chip ROM: unchecked Use On-Chip XRAM: unchecked Use multiple DPTR registers: unchecked
Off-Chip Code Memory: 0x0000 to 0xFFFF Off-Chip Xdata Memroy: 0x0000 to 0x3FFF, 0xE000 to 0x0200, 0xE400 to 0x1C00
I can't figure out why it dosen't seem to work. Anyone has any idea?
Rgds, Tsun Tiong
Use On-Chip XRAM: unchecked <--- checked
But I don't think this is the major reason of the problem.
What is the actual CPU clock (SYSCLK)? The crystal frequency doesn't directly show the SYSCLK, because of PLL. CPU clock is set by the firmware as follows.
bulkloop.c void TD_Init(void) // Called once at startup { // set the CPU clock to 48 MHz CPUCS = ((CPUCS & ~bmCLKSPD) | bmCLKSPD1);
As I said in above post, AT27LV512A works well for 12MHz and 24MHz CPU clock, but not for 48MHz.
For 48MHz operation, you need faster PROM. tACC - Address to Output Delay: < 53ns (AT27LV512A: 90ns max) tOE - OE/VPP to Output Delay: < 35ns (AT27LV512A: 50ns max)