The Ethernet Control Chip dm9000 is able to receive data correctly on 2440 bare metal (the source code project has been uploaded)
(411.47 K) the attachment was downloaded 168 times
After a few days of dm9000, I have never been able to correctly receive data. I am so depressed for a few days. Now I am happy.
I have referred to this Article "single-chip microcomputer-driven dm9000 Nic chip (detailed debugging process)". The article is very good and detailed. If you are interested in dm9000 Driver, please refer to the original article.
Http://hi.baidu.com/mikenoodle/blog/item/dda3a4cc034e871800e9287a.html
Http://hi.baidu.com/mikenoodle/blog/item/a271def982bc6a51242df279.html
The original article will not be reprinted, mainly to summarize the problems I encountered.
Problem 1: MMU is not enabled and cannot be interrupted (my program runs in memory)
Problem 2: the ID of the dm9000 read is incorrect.
Cause 1: The read base address is incorrect. In micro2440, it should be
# Define dm_add (* (volatile unsigned short *) 0x20000300 ))
# Define dm_cmd (* (volatile unsigned short *) 0x20000304 ))
Cause 2: MMU is not set
Mmu_setmtt (0x20000000, 0x27f00000, 0x20000000, rw_ncnb );
The read/write type of bank4 should be rw_ncnb.
Problem 3: data cannot be correctly received
Cause: If a register dm9000_mrcmd is misread, the read data address is automatically increased. If the address offset is incorrect, the data is not obtained.
Upload the code of the entire project later. The code is messy now. Sort it out and upload it again.
Mirco2440 dm90000 driver