Why can't I get USB TX to work on my Nucleo board?
I am new to the ST world and have a Nucleo-H7A3ZI that I am testing with. I have STM32CubeIDE setup and have an LED toggling, so I am comfortable that I have the toolset configured properly.
My next step was to send some characters over USB to the host. Once that is working, I am going to send from the host and echo them back to see both directions working. But I cannot get the Nucleo to transmit anything....
I setup the connectivity for the Internal FS Phy to be "Device_Only". I tried Activate-VBUS both enabled and disabled. In middleware I setup the HS class as CDC and generated the code.
Then in my main.c I:
1 -
#include "usbd_cdc_if.h"2 -
/* USER CODE BEGIN 2 */
HAL_Delay(1000);
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
CDC_Transmit_HS(buffer, sizeof(buffer));
HAL_Delay(1000);
}No dice. I've done a few other things where people recommended adjusting a case statement in usbd_cdc_if.c, etc. But nothing seems to matter. No matter what I do, I get USBD_BUSY in the CDC_Transmit_HS function.
What am I missing? I am sure it is something silly.
