Skip to main content
mete
Senior
November 21, 2023
Question

how to return STALL to USB OUT transaction and still continue with the next transaction

  • November 21, 2023
  • 1 reply
  • 4842 views

I am trying to implement a USB 2.0 FS device on STM32H5 without using HAL or anything else. There might be a need to send back a request error (STALL) during enumeration:

- and it is OK to return STALL to an IN transaction, so I can set STTX to STALL and STRX to VALID, so the device stalls IN and then still continues with the reception of the next transaction,

- but I dont understand how to send a STALL to OUT (e.g. to reply to Set Descriptor) and then continue. If I set STRX to STALL, I think transaction complete/CTR interrupt is not raised, so how can I change STRX back to VALID ?

This topic has been closed for replies.

1 reply

mete
meteAuthor
Senior
November 21, 2023

on a second thought, I guess RX is always set as VALID and TX is set to STALL in any case independent of data transfer direction ?