I have implemented an SPI interface in Cypress FX2. I have problems in giving the XDATA and CODE. I gave the settings as CODE - 0X80-0X0fff and XDATA 0X1000. But when I program it ,Iam not able to see the SCLK. IS anything wrong with the memory settings . Thanks. Vanitha
> I have implemented an SPI interface in Cypress FX2.
How did you implement SPI? EZ-USB FX2(LP) doesn't have any on-chip SPI. Did you connect an external SPI chip? Or, did you trick the UART as this app note shows, or bit banging?
"SPI Implementation Using Serial Mode 0 on EZ-USB - AN1067" www.cypress.com/
> I have problems in giving the XDATA and CODE. I gave the settings as CODE - 0X80-0X0fff and XDATA 0X1000.
Did you see any error on the linker log? If not, it sounds like fine.
> But when I program it ,Iam not able to see the SCLK. IS anything wrong with the memory settings .
Did you see any other trouble than SCLK? Other functions - like USB enumeration - works fine? Why do you think the trouble is related to the memory setting?
Information is too short to comment something helpful.
Tsuneo
I have written a software SPI refering the application note AN-1068 from cypress. I did not use the file FW.C and other files that is needed for reenumeration. Should I re enumerate the FX2 for proper functioning ? Thanks Vanitha
The target MCU of AN1068 is the original EZ-USB (Anchor AN2131). Therefore, you have to rewrite the code intensively for FX2(LP).
In this appnote, port C is assigned to the bit-banging port. The original EZ-USB maps port C on XDATA area (OUTC: 0x7F98). FX2(LP) places it on the register area (IOC: 0xA - bit-addressable). It is the reason the code doesn't work.
I am using port E , I have already replaced OUTC by IOE(0xB1). Now Iam also re enumerating the FX2. I have used TD_Init() and TD_poll() in the coding . Still I have problems . Vanitha
View all questions in Keil forum