2023-11-21 02:51 AM
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 ?
2023-11-21 03:00 AM
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 ?