cancel
Showing results for 
Search instead for 
Did you mean: 

USB CDC on Nucleo-G431RB-C04

PecasHUN
Associate II

Hello,

I would like to build up an USB-CDC communication which gets the commands from the PC and forwards the messages to CAN. I have choosen a Nucleo-G431RB-C04 board, which have a FDCAN and a USB-FullSpeed inteface also. Do I able to create an USB-CDC for the mentioned board? I have read several different information of the USB interfaces on the Nucleo boards, and I would like to be sure before I will buy the mentioned card.

If not, please recommend for me concrete Nucleo board type for this task.

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions

Yes, the chip has USB - but the board doesn't provide any connection to it.

You would have to add that externally.

 

As @mƎALLEm said, if you specifically want a board with a Target USB connector on it, then the Nucleo-G431RB-C04 is not the one for you.

 

Similarly, I don't think that Nucleo board has CAN transceivers?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

View solution in original post

7 REPLIES 7
Andrew Neil
Super User

@PecasHUN wrote:

Nucleo-G431RB-C04 board, which have a FDCAN and a USB-FullSpeed inteface also..


Are you sure?

Looks like the board only has USB for the ST-Link - no Target USB ?

https://www.st.com/resource/en/user_manual/um2505-stm32g4-nucleo64-boards-mb1367-stmicroelectronics.pdf

via: https://www.st.com/en/evaluation-tools/nucleo-g431rb.html#documentation

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
PecasHUN
Associate II

Hi Andrew,

I have referred to the STM32CubeMX, where I have selected the Nucleo-G431RB. See the pinout and the configuration in the attachment. Or isn't it valid?

Thanks.

 

 

The PA11/PA12 pins aren't connected to the USB connector. The USB connector is connected to the programmer, not the STM32G431RB chip.

Other nucleo boards have an additional "user" USB connector connected to PA11/PA12, perhaps choose one of those.

If you feel a post has answered your question, please click "Accept as Solution".
mƎALLEm
ST Employee

Hello,

As said by @Andrew Neil , Nucleo-G431RB board doesn't have a USB OTG connector.

Meanwhile for example NUCLEO-H503RB has that USB connector.

screenshot.png

STM32H503 has a FDCAN interface but you need to add a CAN/FDCAN transceiver as the board doesn't have one.

An example of USB CDC ACM is available in STM32H5 Cube HAL package using USBX stack under the link Projects\NUCLEO-H503RB\Applications\USBX\Ux_Device_CDC_ACM 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

Yes, the chip has USB - but the board doesn't provide any connection to it.

You would have to add that externally.

 

As @mƎALLEm said, if you specifically want a board with a Target USB connector on it, then the Nucleo-G431RB-C04 is not the one for you.

 

Similarly, I don't think that Nucleo board has CAN transceivers?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
Andrew Neil
Super User

@PecasHUN wrote:

I would like to build up an USB-CDC communication which gets the commands from the PC 


You could do that on the Nucleo-G431RB-C04 board by simply using the Virtual COM Port (VCP) in the ST-Link - no need to provide a USB stack and implement CDC on the target ...

 

(still no CAN transceivers on the board, though)

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
PecasHUN
Associate II

Hi,

many thanks for your answers. I know that there is no user USB connector, but this is a small HW issue which can be handled easily. My real question was that I could use this USB in the chip as CDC or not, and I see from your answers this is not a problem, I only have to add a USB connector, same like I have done before with the CAN tranceiver on the F103 Nucleo.

Thanks again and have a nice day.