How to use USB on the BF707 platform ?(no operating system environment)
Hi, my friend
I have some questions to ask you and give you some information.
1.The development platform is bf707.
2.Configure usb to work in peripheral mode according to the hardware manual.(No operating system environment)
3.First establish the endpoint, the hardware manual is described as follows:
"One key parameter required before a transfer can occur through an endpoint is the maximum USB packet size that
the endpoint can support. The software sets this value. It depends on various system constraints. These constraints
include the size of hardware FIFO available and system latencies as well as the USB transfer type and class used. The
USB_EP[n]_TXMAXP or USB_EP[n]_RXMAXP registers define the maximum amount of data that can be transferred
to the selected endpoint in a single frame. The value must match the programmed maximum individual packet
size (MaxPktSize) of the standard endpoint descriptor for the endpoint.
For transmit endpoints, program the maximum packet size using the USB_EP[n]_TXMAXP. For receive endpoints,
the USB uses the USB_EP[n]_RXMAXP register. The maximum packet size must not exceed the actual hardware
endpoint FIFO size.
The settings in the USB_RXFIFOSZ or USB_TXFIFOSZ register determine the corresponding sizes of the transmit
or receive FIFOs, as well as, single or double buffered mode for endpoints 1 to 11."
The above quotes are the contents of the manual.
The configured value cannot be written to the register(USB_EP[n]_TXMAXP and USB_EP[n]_RXMAXP and USB_RXFIFOSZ and USB_TXFIFOSZ) during the actual configuration of endpoint 0 (usb control endpoint).
In other words, the following statement does not take effect.
*pREG_USB0_EP0_RXMAXP = 0x1040;//1040
*pREG_USB0_EP0_TXMAXP = 0x1040;
*pREG_USB0_RXFIFOSZ = 7;
*pREG_USB0_TXFIFOSZ = 7;
(PS:I am looking at the value of the address in the memory browser, it does not take effect.
But for the configuration of endpoint 1, it is effective.)
Why is there such a situation? Is there a problem with my operation?
Request help.
Thanks.
If you want to recommend me to use the CLD_BF70X_BULK_library, then this is no longer necessary. Since I have used this library,
but the windows system failed to get the device descriptor, I can basically determine that it is not a software problem, because even if
I use the library's own routines, this problem will occur.
Since the response descriptor request works, it is done by the initialization function in the CLD library, so this part of the operation
does not exist my operation error.
So what I want to know is, is this related to the previous failure to write the correct value to the register? Is this an abnormal phenomenon?
Or how to use the USB function in an operating system-free environment?
Request help.
Thanks.
bf707
usb
Please log in to reply.