grafalex82 / GPSLogger

Arduino-based portable GPS logger with LCD screen
74 stars 23 forks source link

Sometimes data sent over USB CDC is corrupted #51

Open grafalex82 opened 7 years ago

karmaok commented 6 years ago

Hello, on my device got the issue goes further to transmit corrupted data always in composite device mode. My chip is STM32F746 and a pair of descriptor complects(class descriptor, configuration and functions to handle diffrerent USB connection stages as Init, DataIn etc.): one for standalone CDC and one for CDC+MSC. For composite device I used functions from your topic (which is great and very helpful!!) and now all except CDC transmittion is working fine. But calling CDC_Transmit_FS function leads to transmitting of junk bytes instead of buffer provided. An amount of junk bytes is always 4. Which way it could be resolved? Where to dig? same function is working fine when the device is in standalone CDC mode as well as CDC_Receive_FS works fine in both modes. May it be some PMA buffer issue or maybe what else? Thank you