cancel
Showing results for 
Search instead for 
Did you mean: 

USB XACT_ERROR response on BulkIn request

SteMMo
Associate III

Hi all,

we are developing a board based on STM32F429 chip.

In particular I'm developing a composite USB device on USB OTG port, showing a custom device + a CDC device [ep 0x85, 0x06, 0x83] using USB_Device_Library code.

Windows correctly shows 3 items: a composite device, a generic USB device with my custom label/name, a virtual serial port (COM8).

When I try to open the virtual port (by Putty) I see nothing on the terminal but if I inspect with Wireshark I see an infinite loop of BulkIN request, BulkIn response with XACT_ERROR, a RESET_PIPE_AND_CLEAR_STALL with both request end reply.

SteMMo_0-1734001551484.png

I'n wondering why I have the XACT_ERROR on BulkIn request: I'm not able to find the point. I break-pointed some code in the HAL_PCD_IRQHandler() routine but it's hard to step in an interrupt handler.

Very similar code (but compiled for STM32MP135 demo board) is working correctly.

I'm focusing on USB_OTG_GINTSTS_IEPINT interrupt but which is the routine that replies to BulkIn?

Maybe the PCD_WriteEmptyTxFifo() ??

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @SteMMo 

You are right. Using FS instance, STM32F429 supports only 4 EPs (4 IN + 4 OUT)

FBL_0-1737453757022.png

You cannot use endpoint 0x85 (which corresponds to endpoint 5 IN) in FS mode. You need to reconfigure your USB device to use endpoints within the supported range. Otherwise, you can use HS instance.

To learn about the number of endpoints available, refer to the associated STM32 datasheet or section 2.1 "USB implementation on STM32 products" in application note 4879.  Also, you can check this article How to select suitable endpoints for your STM32 US... - STMicroelectronics Community

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.


View solution in original post

3 REPLIES 3
SteMMo
Associate III

Adding some notes...

 

Comparing with the run on the DEMO board I noticed that the IRQ handler is never recall  with interrupts for EP IN 5 (0x85), only for EP 0.

I guess that the XACT_ERROR is caused from the missing reply.

On the DEMO board the EP IN is 0x82: in a simple log the opening of the serial port is:

IRQ IEPINT - ep_intr: x4
- epint ep.2 x1
- IEPINT XFRC ep.2

IRQ RXFLVL

IRQ IEPINT - ep_intr: x4
- epint ep.2 x80
- IEPINT TXFE ep.2
WriteEmptyTxFifo ep.2

From the Wireshark capture I see the BulkIN packet toward 0x85 IN endpoint !

How it is possible?

 

From the reference manual, it seems that EPs greater than 3 are not supported for FS USB mode, so it is impossible to set the mask for EP 5.

Please, can anyone confirm this?

 

Hi @SteMMo 

You are right. Using FS instance, STM32F429 supports only 4 EPs (4 IN + 4 OUT)

FBL_0-1737453757022.png

You cannot use endpoint 0x85 (which corresponds to endpoint 5 IN) in FS mode. You need to reconfigure your USB device to use endpoints within the supported range. Otherwise, you can use HS instance.

To learn about the number of endpoints available, refer to the associated STM32 datasheet or section 2.1 "USB implementation on STM32 products" in application note 4879.  Also, you can check this article How to select suitable endpoints for your STM32 US... - STMicroelectronics Community

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.