Dear All,
Here I had another problem in TEST MODE ----TEST_PACKET.
My env.
1.AM335X_StarterWare_02_00_01_01 source code
2.Use 0x4740140F (USB0_BASE+TEST_MODE)
I use the AM335X_StarterWare_02_00_01_01 source code to implement USB TEST_MODE.
According pdf file.
//========================================================================
2 8 . 4 . T E S T _ PACKET
To execute the Test_Packet test, the software should:
(i) Start a session (if the core is being used in Host mode).
(ii) Write the standard test packet (shown below) to the Endpoint 0 FIFO.
(iii) Write 7’h08 to the TestMode register to enter Test_Packet test mode.
(iv) Set the TxPktRdy bit in the CSR0 register (D1).
The 53 byte test packet to load is as follows (all bytes in hex). The test packet only has to be loaded once; the MUSBMHDRC will
keep re-sending the test packet without any further intervention from the software.
00 00 00 00 00 00 00 00
00 AA AA AA AA AA AA AA
AA EE EE EE EE EE EE EE
EE FE FF FF FF FF FF FF
FF FF FF FF FF 7F BF DF
EF F7 FB FD FC 7E BF DF
EF F7 FB FD 7E
This data sequence is defined in Universal Serial Bus Specification Revision 2.0, Section 7.1.20. The MUSBMHDRC will add the
DATA0 PID to the head of the data sequence and the CRC to the end.
//========================================================================
The pdf list four parts to implement.
(i)I use the device0 not a host so that I skip (i).
(ii)I use the API USBEndpointDataPut to put PATTEN(53bytes) to FIFO
"USBEndpointDataPut(0x47401400, USB_EP_0, TESTPATTEN, 53);" //TESTPATTEN[53]={0x00,.......0x7E}
(iii) HWREGB(0x047401400 + USB_O_TEST) |= 0x08;
(iv) HWREGB(0x047401400 + USB_O_CSRL0)|= 0x02;
And I use the protocol analyzer capture the packet , USBDevice did not sent TESTPATTEN(53Bytes).
Is that another register need to set?
What should I do when I occur this condition?