cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F469 configured as USB HS Peripheral indicates USBD_STATUS_XACT_ERROR to host

cmcneal
Associate

Hello,

 
I have the following device under test (DUT), based on the CDC Standalone example in STM32Cube_FW_F4_V1.27.0. 
  • STM32F469I MCU
  • USB3300 ULPI PHY
  • HCLK and SYSCLK set to 180MHz
  • TXFIFO size is set to 2048 bytes, RXFIFO size is set to 1024 bytes
  • The DUT is configured as USB Peripheral device
  • The DUT is configured as USB CDC with ACM subclass (virtual comport using 11520 baud rate, 8 bit data, no stop bit)
  • USB Host is a Windows PC -- running an executable that reads the data from COM port, verifies data fidelity, and calculates throughput
  • Utilizing Wireshark on the Windows PC to examine USB data sent/received across the endpoints)
  • Three endpoints are configured :
    • Endpoint 0(control transfer type)
    • Endpoint 1 ( bulk transfer type with max packet size = 512 bytes for both IN and OUT)
    • Endpoint 2 (interrupt transfer type with max packet size = 8 bytes for OUT) .
  • The DUT is coded to write a known data pattern to the bulk transfer type endpoint when a connected event is indicated. This data is written using the USBD_CDC_TransmitPacket() function part of the ST library (in STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.c). An attempt is made every 5ms to write the known data pattern via USBD_CDC_TransmitPacket(). 
 
With the above setup, the DUT enumerates on the Windows USB Host. It enumerates as a High Speed USB device. Also, DUT is identified as a virtual com device and the LINE_CODING parameters are read and set (115200 Baud, 8 bit data, no parity, no stop). On the Windows Host, a new COM port is shown. Next, I run an executable on the Windows Host (connects to new COM port) which will read data from the DUT. 
 
The results are that  for a few milliseconds, I see correct behavior. The known data pattern is received from the DUT by the Windows Host via Bulk Transfer type (i.e., across endpoint 1). However, quickly, an error occurs. On a Bulk transfer type, the Window Host sees a USBD_STATUS_XACT_ERROR from the DUT.
 
I'm looking for advice on how to root cause this issue. I cannot find this error nor the register(s) to examine to see how this status is determined or indicated.
 
Here are the things I've tried to narrow the cause of the issue.
 
  • I have also tried same type of setup on the STM32429I-EVAL devkit board  (utilizing ULPI with the external PHY on the silicon (STM324x9i).  Utilizing the same Windows Host and Windows Host executable. This saw no issues (was able to run 6 hours without any errors)
  • I tried reducing the SYSCLK and HCLK to 168MHz (on the custom board). Still has same issue. Also tried speeding up the devkit clk to 180MHz. This still showed no issue
  • Tried changing the interval of the DUT sending data to 10milliseconds, 50 milliseconds, 1 millisecond, 500 microseconds. Still saw the same issue. And the frequency of occurrence seemed random.
 
Thanks, in advance, for the help.
2 REPLIES 2
mohamed.ayed
ST Employee

Hi @cmcneal , can please send me your project in private to reproduce this case and specify which host are you using (Linux, MacOs, Windows ..)

fsegatz
Associate

Hej! I have the same issue with an STM32F405 MCU. Is there any update on the origin of the USBD_STATUS_XACT_ERROR?