2015-09-07 12:51 AM
I am intending to port GRBL Gcode interpreter to run on stm32f4 discovery and I have seen several reports that the OTG USB port ( more specifically the provided ST firmware ) is not reliable.
A colleague in the UK working with audio synth could not get reliable data transfer and moved to using USART where it worked as designed. A partial port of GRBL to STM32 found similar reliability issues and adopted a similar solution. Is this a known issue, is this the right place to raise it ? Thanks. #stm32f4-discovery-otg-usb2015-09-07 02:57 AM
Hi mouser,
Could you explain how the OTG USB port is not reliable? And what kind of reports did you seen? -Shahrzad-2015-09-07 02:11 PM
Thanks for picking this up.
One instance was someone trying to port GRBL to STM32 . He did not provide much detail on the issues. He suggested that setting up a loopback would probably lock it up. Though he did not provide a proper test case. https://github.com/deadsy/grbl_stm32f4 Another was a UK colleague who was working on audio and was unable to get send his synth audio data via CDC. I could try to get more details of the problem but he's not very communicative. I'll see what I can find. He also opted to use USART and said it was fine. Now I have someone from ST on the case, I'll try to get more specifics.2015-09-07 02:15 PM
The CDC audio case was only giving data rates about two orders of magnitude slower than USB ''full speed'' , IIRC.
2015-09-08 06:31 AM
I'm the author of the repo to which mouser is referring.
I wanted to use the USB CDC functionality as a serial port.I derived from the CDC code in the STM32cube SDK.It works- for a short time. The serial port locks up after a few minutes of moderate to heavy throughput. I assume the issue is in the USB driver code which is unmodifed from the SDK. Also - the use of a timer ISR on the Tx-side seems really hokey. I can understand how you want to accumulate bytes on the Tx- but a one shot would be a better solution than a periodic.Here's the code:https://github.com/deadsy/grbl_stm32f4/blob/master/board/usbd_cdc_interface.c2015-10-26 03:44 AM