africarest.blogg.se

St nucleo board
St nucleo board











st nucleo board

Click Finish, and you’ll be asked a few questions:

st nucleo board

We’ll be using C as our language for this example. On the next screen, give your project a useful name (such as “nucleo-f042k6-vcp-test”). I’ll pick the Nucleo-F042K6, since that’s the board I have. In STM32CubeIDE, start a new project (File > New > STM32 Project). I don’t have a bootloader working (yet) to where we can send binary files over VCP, but that’s on my to-do list.įor this, I’m using STM32CubeIDE along with the STM32F0 HAL API. We’ll be sending our compiled program over to the ST-LINK side of the board, and the VCP will enumerate on the USB lines that we just added. Plug the two USB cables from the Nucleo board into your computer. USB GND → USB Shield (don’t know if this is necessary, but it makes me feel better)Īlso, this is super important: remove the jumper that comes default on your Nucleo board! It bridges D2 and GND and will short out our D+ line if left in place.VUSB → Diode → Nucleo 5V (don’t want to short something if we’re plugging in 2 USB cables!).

st nucleo board

To begin, strip a USB cable or get a USB breakout board (like this one from SparkFun) and connect the lines to a breadboard as shown in the Fritzing diagram below. Note that if you are using a Nucleo board with an STM32F401 or STM32F411, you will need to solder an external crystal to the board, as it is unpopulated on those boards. I highly recommend looking over the USB Hardware and PCB Guidelines document from ST Microelectronics to learn about what’s needed for your particular STM32 part. Specifically, I’m using the Nucleo-F042K6, as it has a built-in USB device peripheral (full speed), and it does not require an external crystal.

#St nucleo board how to

As I continue my journey with STM32 development, I wanted to share my findings with how to get a Virtual COM Port (VCP) working with a Nucleo board.













St nucleo board