cancel
Showing results for 
Search instead for 
Did you mean: 

Nucleo F303RE USB Serial Comm HAL example code?

David Pekin
Senior

Hello,

I suspect there's example code for reading and writing serial data through the USB comm port (ST-link cable) on the Nucleo boards using the HAL libraries. Can anyone point me to one?

I've seen the printf() example which is half way there.

Thanks in advance,

Dave

2 REPLIES 2
Amel NASRI
ST Employee

Hello @David Pekin​ ,

In the Step3 of "STM32 step by step", there is a description of what you need to do to perform serial writing.

It is based on STM32CubeMX, you need just to select the correct board at the beginning.

-Amel

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.

Thanks. I'll take a look at it. I'll take a look at it. I've already got serial writing to the port via printf() & mapping PUTCHAR to the port. I'm now wanting to make a command prompt handler so I need the reading portion. I'm sure I can reinvent the wheel but thought it must be already around in some example.

Thanks again.