Rndis project note

Source: Internet
Author: User

--------------- By nasiry

Reprinted, please describe the source and notify me

USB device configuration status of the original driver

End Point

1. ep0 Control

Max packet SIZE-8BYTE

Auto clear

2. EP1 Control

Max packet SIZE-64BYTE

Mode = in;

Transmode = Bulk

3. EP4 Control

Max packet SIZE-64BYTE

Mode = out

Transmode = Bulk

Transfer counter = buffer size

Unit conuter = 1 byte

DMA write (out)

Enable DMA mode

Disable demand mode

DMA read disable (in)

4. ep3.ep2 is not used

dma3 configuration
1. use dma3 for bulk transmission
2. source APB (see USB device bus connection mode) physical address of source address EP4 in fix mode
3. target AHB (memory), increase mode, the destination address directly uses the dma3 buffer in the global drive reserved area
4. protocol: handshake mode, request from APB, current terminal count enable, no burst, single service, source = usbd, hardware source, no_autoreload, byte Transfer, current terminal count
proposed configuration
1. ep0 Control
MAX packet size = 8
autolclear enabled
2. EP1 data output
MAX packet size = 64 byte
mode = in
transmode = Bulk
interrupt = Yes
DMA = No
3. EP2 interrupt control (output)
MAX packet size = sizeof (interrupt_data)
mode = in
transmode = interrupt
interrupt = No
4. EP4 data input
MAX packet size = 64 byte
mode = out
transmode = Bulk
DMA = disabled
interrupt = Yes

Debug the compilation environment

Use the compiling environment provided by WindowsCE

Add the project to the bootloadCodeTo debug.

Need to modify eboot

1. Increase the ing from 0x0 to 0x0.

2. Enable eboot interruption

3. eboot self-lifting


Originally, the 0xing from 0x0 to 0x0 was used. Since the compiler automatically occupies the front-end 4 K bytes of the image, you cannot directly use 0x0 to install the interrupt vector. Instead, map 0x3000 0000 to 0x0 to load the interrupt vector from the memory.

Question 1.

After MDD is used, because MDD uses the kernel function nkcreatestaticmapping (defined in private \ winceos \ coreos \ nk \ kernel \ Arm \ mdarm. c), and eboot defines a lot of functions with the same name as the kernel function, so that eboot cannot directly use NK. lib participates in the Link. This function must be implemented separately. Pcigetbusdatabyoffset directly removes the call to this function in MDD because it is not used by itself.


 

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.