Replies: 3 comments 1 reply
|
Hi, from both log I see that device received the data: But in the 1st log there is no data sending from the device, from 2nd log: |
|
Thanks for reply.
Next step should be my FreeRTOS CDC task, that receives the message and processes it, but this does not happen. If I open the port in a serial terminal afterwards, the CDC task in the micro fires without my sending a new message. How can I debug this behaviour any further? This is the task implementation. I am using FreeRTOS-Cpp which is a C++ wrapper for the standard FreeRTOS task including a task function. Wireshark log (3.16 is my board): Tinyusb log: These are the logs, if I open the port in a serial terminal afterwards: Tinyusb: |
|
Could anyone help me out with my problem? I do not know what I am doing wrong and I do not want to open a bug ticket, but I do not know how to help myself. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hey,
I am a USB newbie and need your support to debug my first project with USB.
After trying out a lot, I have no idea where to continue search the error and I would love to get some advises.
Project:
I have designed a microcontroller board with a STM32F105 and a PC application based on .net to change parameters on the board. Both use my own serial protocol to exchange information. The PC OS is Ubuntu and the micro uses FreeRTOS.
Previous versions of the microcontroller board used a uart with uart2usb converter to interact with the PC, but the same serial protocol and the same PC application without any problems.
The new version uses the STM32F105 with the dwc2 peripheral and a USB-C port on the board. And Tinyusb ;)
Within the PC .net application I am using "System.IO.Ports" as interface library, but due to known issues only the "Basetream" object of it.
Problem:
When I am connecting the board to the PC via USB, everything looks ok. Board is detected, enumeration works and the serial ports gets detected by ubunutu, no errors or warnings in dmesg.
But starting the .net application trying to connect via it, results in sending the 1. message and never getting a reply.
The micro receives the message and replies as expected, but the .net application never receives this reply.
This the debug output of tinyusb, while trying to send the serial commands: (device was already connected)
Debugging attempts:
Next I tried several combinations of hardware and pc tools find the source of the error.
UsbInterface_Descriptors.cpp
With sending the same commands I get the expected reply without any issues. I attached the tinyusb debug output too:
The Bluepill ran the "cdc_msc_freertos" example and I added the needed reply from my serial protocol to the main function and everything works just fine...
I added the needed reply from my serial protocol to the main function and it works.
Sorry, I did not spent the time to figure out, how to get the debug log of the stm usb lib via RTT.
Last but not least I attached my USB desciptors file and my tinyusb config.
UsbInterface_Descriptors.cpp
I am not able to upload a ".h" file...
All reactions