Showing results for 
Search instead for 
Did you mean: 

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


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 ?


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 ?