MBED OS USB APIs on theNucleo-F767ZI

Hi there,

I want to try a communication via MbedOS USBSerial api between USB-OTG which is on the Nucleo-F767ZI board and a serial monitor on Windows10 (USB 2.0).
When I connect the both cables to the pc and upload the example code from Api’s page, the system recognize the usb device and a COM15 is created but I received no message.
When I tried USBKeyboard or USBMouse, both worked well.

Can you tell me what I doing wrong, please?

Thank you
BR, Jan

No one know? And Mbed support not working this week?

Hello Jan,

When I connect the both cables to the pc and upload the example code from Api’s page, the system recognize the usb device and a COM15 is created but I received no message.

  • Are you sure that the COM15 was created for the USB-OTG connection and not for the ST-Link? Try to connect the serial terminal running on the PC to the other virtual COM port.

  • Make sure that JP4 (USB_EN) is on.

Hi Zoltan,
thank you for your reply.

Yes, I am sure. I have connected ST-link on COM3 with a PC serial application (Termite 3.3) and when I add a simple printf("Start\n"); it works.
The new USB device under the COM15 is recognized after the example code started to be executed and second cable is connected. For this I have opened second instance of the serial application with no response.

JP4 is on from default and I not changed that.

However, I debug it via the printf and I found the program never reach the main. So it is stuck inside the USBSerial.

BR, Jan

I tried to debug it with the MbedStudio but because of this it not possible to do that.
Another suggestion or an explanation what I do wrong? Please.

Thank you.
Jan

Ahoj Jan,

I have tried to debug the USBSerial example with OpenOCD and it seems that on MS Windows the USBSerial’s constructor is stuck when calling USBCDC::wait_ready() at wait_op.wait(NULL);. However, the USBSerial example works fine on Linux (Ubuntu 18.2).

1 Like

Ahoj Zoltan,

you led me to the right direction.
The problem is application, what I used. I do not understand why but for a reason, my favorite application (Termite 3.3 or 3.4) is not working correctly with this USB type.
I tried also another application of course, before I wrote this topic. But now, after you confirmed it works somewhere, I tried PuTTY, and with it, that works also on the Windows.

Thank you for your time, that helped me.

BR, Jan

the USB serial wants a DTR signal on the terminal side. Putty sets it, in other terminal programs you may have to set it manually. I’m using the old Br@y Terminal v1.9b, there I have to set DTR and RTS also manually.

2 Likes

thanks for this explanation,
does it mean that if you use the USB OTG as USB Host Serial on a Nucleo F767ZI, u need to use DTR commands to properly communicate with an external USB Serial Device? I posted the complete issue here: Mbed OS5 - Nucleo USB host Serial

thanks