Extra byte received from host that causes stall #1307
Unanswered
berke-bakar
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Thanks for your kind words, would you mind providing more information for reproducing purpose
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi @hathach thank you for this awesome stack. I work for a semiconductor company and I am trying to add tinyusb support to one of our evkit. We came across a weird thing and we could not understand why this happened. I attached both STM32F407DISCOVERY board and our board's logs to compare. Notice that our board stalls the request
C8 A1 21 00 00 00 00 07
as it is meaningless. But the thing is that should be a GET_LINE_CODING request. There is an extra C8 byte in front of it and since we only get 8 bytes for setup packets the last 00 byte is not seen there. We could not find a reason why there is an extra C8 byte. This problem also occured in SET_LINE_CODING request before the last GET_LINE_CODING request. But in that case it was a mistake by my side and I mistakenly set our state to idle so the data part of the SET_LINE_CODING recognized as a setup packet. So when we read 8 bytes it looked like this00 C2 01 00 00 00 08 C8
. So it appears that after the data part of set line coding and before the last get line coding request there is an extra C8 byte that is received. Have you ever encountered something like this? Do you have any suggestions or checks I should do to see where is that C8 byte comes from. Currently I do not have any USB analyzer but ordered one.PS. In the logs you might have noticed the tinyUSB stack sends a request that is larger than 64 bytes even though our endpoints max size is 64. This is because we had to tweak data_stage_xact to send us all of the buffer. Otherwise the DATAEND bit was set early on and hardware considered the transfer is over.
board_log.txt
stm32f407disco_log.txt
Beta Was this translation helpful? Give feedback.
All reactions