-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get_state drops text on the STM32 #2357
Comments
It's not a bug, it drops text on all cams. The TX buffer eventually overflows now that text is not polled separately. I can send more text in the same packet, up to 512 if the IDE can handle variable length string. |
The text isn't destroyed with GetState using TinyUSB or not using GetState with the STM32. Seems like it's just related to the STM32 using GetState. Even with a polling rate of 1KHz very small strings are eaten. Something is off. |
The STM32 clears CDC buffers on soft-reboot, for some reason which I forgot. Also the TX buffer on some boards is bigger than the ST TX buffer. |
I fixed this, however text can still be chopped off if you print a lot of text and if the poll rate is slow. As I've mentioned above I can extend GET_STATE to use the remained of the max packet size for text (close to 512 bytes per packet) if the IDE can handle variable sized, null-terminated strings. |
No, the IDE will be confused by that. The return size must be what was requested in the USB command. However, I can make the packet size I ask for larger if I know the board's capabilities. Maybe add a flag to the flags mask that says I can request 512 bytes versus 64 for the get_state packet? The first one I ask for will be 64 bytes, but, then, I can ask for 512 bytes afterwards on caching that capability. |
You should be able to figure out the endpoint size easily. |
I noticed that a lot of lines of text are missing on the STM32 with get_state.
Pretty easy to replicate with master:
Gives:
With the old polling. With get_state() I get:
The same on a tiny USB board produces:
Need to look into how to fix. The change related to breaking on interrupts being disabled shouldn't affect this as interrupts are on.
The text was updated successfully, but these errors were encountered: