The Ethernet Control Chip dm9000 is able to receive data correctly on 2440 bare metal (the source code project has been uploaded)

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.