I'm using the STM32 VCP firmware and I want to transmit data to my PC from STM32F4 discovery board.
The configuration of the virtual COM port is fine, the properties are the following in device manager:
In english: 9600 bit/s, 8 data bit, no parity, 1 stop bit, no hardware flow control.
I'm trying to receive characters in Realterm with these parameters, but I don't get them, it looks like following:
What could I do wrong?
EDIT:
The MCU sends with the following code snippet:
int main(void)
{
HAL_Init();
SystemClock_Config();
MX_GPIO_Init();
MX_USB_DEVICE_Init();
uint8_t Buf[] = "test";
HAL_Delay(1000);
while (1)
{
CDC_Transmit_FS(Buf, 4);
HAL_Delay(1000);
}
}
Best Answer
The
CDC_Transmit_FS
implementation is buggy (at least in the version I am looking at):As you can see the
Buff
parameter is never used in the function. You might try modifying the function, by copying theBuff
intoUserTxBufferFS
(usingmemcpy
or whatever).