38.6.2.20 Test Modes

When written to one, the USBHS_DEVCTRL.TSTPCKT bit switches the USB device controller to a “Test-packet” mode:

The transceiver repeatedly transmits the packet stored in the current bank. USBHS_DEVCTRL.TSTPCKT must be written to zero to exit the Test-packet mode. The endpoint is reset by software after a Test-packet mode.

This enables the testing of rise and falling times, eye patterns, jitter, and any other dynamic waveform specifications.

The flow control used to send the packets is as follows:

  • USBHS_DEVCTRL.TSTPCKT = 1;
  • Store data in an endpoint bank
  • Write a zero to the USBHS_DEVEPTIDRx.FIFOCON bit

To stop the Test-packet mode, write a zero to the USBHS_DEVCTRL.TSTPCKT bit.