--------------- 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.