Re: [Fx2lib-devel] [All My Brain] Comment: "Cypress GPIF waveform behavioral model"
Status: Beta
Brought to you by:
mulicheng
From: Dennis M. <de...@ub...> - 2009-05-13 21:26:51
|
> Much appreciate your work on the FX2 chip. I have applied for membership on the mailing list, but in the meantime have a question. I have downloaded fx2lib, and am tinkering with the examples. I started with what looked like the simplest one, lights.c I have gotten it so compile without errors with sdcc, and have tried to load it with cycfx2prog, but I don't see any output. I assume this is supposed to ripple some of the data pins? I haven't figured out how _light_dummy maps out to the I/O ports, so I couldn't guess what pins it was supposed to toggle, so I checked them all. The lights are hard coded to the addresses on the fx2 ez-usb devel board (CY3684/3674). There are 4 lights at the top of the board d2-d5 that toggle on and off if I recall correctly. If you're not using the fx2 devel board, and you have a serial port, you could try the serial program as an example. As far as loading your firmware go, cycfx2prog is fine. The fx2 examples directory also has a python extension that allows you to do a few handy things with python and demonstrates creating your own driver too if you'll eventually be needed your own driver anyway. > > I have used Wolfgang Wieser's fx2pipe program which at least loads and runs. I have not been able to figure out the relationship between the data transfer rates reported by that program and the FLAG bit outputs coming from the FX2 chip, but that is a totally different matter. > > Anyway, the project at hand is to control some custom hardware that is currently driven through a parallel port. So, 8 data bits and 3 write strobes (select module, select register, write data to register). > The GPIF ought to be able to do this with very little additional logic except for maybe a 2:4 decoder and bus driver chips. The idea is to send a bunch of device commands in one packet, the data in the even bytes, the control strobes in the odd bytes, and the GPIF would provide suitable delays and gate the strobes with one of the FLAG pins to provide adequate setup times and pacing. But, I'm finding it very hard to figure out how to make all this work. (Doesn't help that I had to put this project aside for 3-4 months while other stuff needed attention.) Good luck! Do post your progress and issues along the way. Did you happen to see the fx2lib framework post? It's a quick way to get up and running with your firmware and is quite close to the Keil based framework provided by Cypress. -Dennis |