Hello!
There is the following obscure scenario when using bdm for debugging during USB firmware development.
For UART debugging, I stopped using it because it was based on busy waiting code, however it is unexpected that BDM
also causes (timing) problems.
Here is the test scenario as it is displayed in the analyzer without debugging.
1. Enumeration passes fine
2. Getmaxlun is answered
3. Scsi inquiry is answered, but csw status is not sent.
When debugging with bdm (only event logging) strange behaviour occurrs:
1. Enumeration passes
2. For getmaxlun, sometimes zero data is sent in the data packet, altough one byte was written in the USB FIFO buffer.
3. After responding to scsi inquiry with the amount of data expected by host (36 bytes), there is a transaction that is displayed as a malformed command. It contains an IN packet. Is this a ghost transaction / request on the pc stack from before that was not processed, or possibly a request for the CSW status ?
4. Sometimes the response to scsi inquiry is not recevied at all - according to the analyzer.
Should the csw status be sent when there is an EOT (end of transfer interrupt) after the inquiry data has been sent ?
Is it possible that the BDM and the hardware analyzer are interfering , or that a timing delay is caused by BDM
which affects behavior ?
Kind regards!