Davicom DM9000 programming problem

Hi, I'm prototyping ATMEGA128 + DM9000 hardware. I have run into strange problem, creating the driver for DM9000. I can read the registers, but cannot write them. More specifically: I cannot write the DATA (CMD pin = 1) location, although there is no problem with writing the INDEX (CMD pin = 0) location - I can read the default values of the registers and this requires succesful write operation to INDEX. Of course, I have checked with the oscilloscope all the signals, levels and timings of the DATA write cycle and they look OK. Of course the CMD pin is given high level, there is nIOW pulse, etc.

The code is based on the linux driver from the Davicom's site, and cross-verified by reading the app. note. Essentialy, I only add the implementation of the "atom" in, out operations. I have made the general I/O interface to the DM9000 bus, that means, the code controls every line of the bus separately - I don't use memory read/write instructions.

There is one hardware change with respect to the reference design. I have made a fixed connection of the nAEN pin to the ground (just saving one ATMEGA pin...), meaning, the DM9000 is chip-selected all the time. Maybe that's the problem? Maybe DM9000 possibly needs the falling edge on the nAEN pin to write the INDEX location? Any suggestions? Any kind of hint from you has a potential to cut down my suffering :)

Reply to
Piotr Golabek
Loading thread data ...

Hello Piotr Golabek

How did yo connect DM9000 to Mega128? mapped into the processor'

external address or software simulation of i/o ports? What is th status of AEN pin when you are writing (reading) dm9000?

Regard

Reply to
Nayanip

Hello, Nayanip,

Thanks for the response. I have already managed the problem. The behaviour was really tricky, so I thought it was some twisted logical error. Now I'm pretty sure it was faulty power supply, but will not elaborate on that, because it's not yet well examined (I had to move on with the software). I have just used another board (same design) and it worked. Answering your questions: I don't use external memory interface, just driving i/o ports. I have AEN pulled down to the ground permanently (initially I thought it was the problem - the lack of edges on AEN - but it wasn't).

I must say Davicom support was very helpful (and very quick to help).

Thanks again for your response

Peter

Uzytkownik "Nayanip" napisal w wiadomosci news:UqKdnVcfW5SN3oXfRVn snipped-for-privacy@giganews.com...

Reply to
Piotr Golabek

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.