In the CubeMX configuration perspective, you’ll need to enable a few options to initialize the USB as a Virtual COM Port. Yes to “initialize all peripherals with their default Mode”.Click Finish, and you’ll be asked a few questions: 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.
0 Comments
Leave a Reply. |