1
\$\begingroup\$

I am planning to upload a ready firmware to this STM32 board. And I need to use it through its USB port(which is also used to upload firmware through its ST-link interface).

Now I know that in Arduino board the USB port and the Tx/Rx pins are one and the same thing. So one can communicate with Arduino through its USB port without doing any modification.

Since I haven't dealt with STM32 in this way, I was wondering how can we figure out whether this has the same functionality. Meaning that can we by default use its USB port to communicate with it? Where in its datasheet or manual we can infer this?

\$\endgroup\$
2
\$\begingroup\$

The product page for Nucleo-F302R8 says the following:

On-board ST-LINK debugger/programmer with USB re-enumeration capability: mass storage, Virtual COM port and debug port

It means the USB port is for the on-board ST-Link programmer, which shows by default as three devices, the JTAG/SWD programmer, the USB drive to program it, and as a debug serial UART port.

So yes, it can be programmed/debugged and communicated over serial connection simultaneously. You might want to read the manual for further details how the board works.

\$\endgroup\$
0
\$\begingroup\$

The site you mention for NUCLEO-F302R8 says "USB VBUS". When it mentions 'USB' it means it can communicate through usb.

My answer is wrong, please follow @Justme's answer, and the comments on my answer

I would like to point this out: As you said, Arduino can communicate directly via USB, but this goes for the Arduino board. The atmega328p, which arduino UNO has, cannot speak to usb directly. It uses an external UART to USB translator (commonly FT232R IC).

arduino usb

image from: http://electronics-diy.com/FT232RL_USB_to_Serial_Adapter_for_PIC_AVR_ATMEGA_ARDUINO_MCUs.php

\$\endgroup\$
4
  • \$\begingroup\$ This answer does not answer the asked question about Nucleo-F302R8 board, but something about Arduino. \$\endgroup\$ – Justme Apr 2 at 19:01
  • \$\begingroup\$ The site you mention for NUCLEO-F302R8 says "USB VBUS". When it mentions 'USB' it means it can communicate through usb. This was the answer to his/her question. After that, I pointed something out \$\endgroup\$ – Christianidis Vasileios Apr 2 at 19:03
  • 2
    \$\begingroup\$ The USB VBUS part you quoted means it can be powered from USB, which is not the part that explains how, if at all, it can communicate over USB with the PC. However, it does provide both programming and a serial connection via USB. That is explained elsewhere though. The USB does not go to the target F302 but the programming interface. \$\endgroup\$ – Justme Apr 2 at 19:06
  • 1
    \$\begingroup\$ ohh! Ok I did not know that, thanks! \$\endgroup\$ – Christianidis Vasileios Apr 2 at 19:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.