STM32F446RE : Terminal and USB Virtual Port
Hello, I have some problems with my STM32F446RE (Nucleo-64 )and terminal program (as puTTY and so on).
I connected it by its usb connector (CN1) and it was recognized as Virtual Port: Well!
So I opened STM32Cube MX and set:
-STM32F446 board.
-USB_OTG_FS, as Device only (no VBus or SOF).
-USB_Device as CDC (Communication Device Class)
RCC clock is HSC with Crystal/Ceramic Resonator , 8Mhz Input Frequency, 168Mhz HCLK and 48Mhz to USB.
I have generate code for Keil (and for Atollic too, with the same effect).
So I modified main.c by
-Inserting: #include "usbd_cdc_if.h"
The "int main(void)" function now is:
int main(void)
{
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* Configure the system clock */
SystemClock_Config();
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_USB_DEVICE_Init();
uint8_t Text[] = "Hello\r\n";
HAL_Delay(1000);
while (1)
{
CDC_Transmit_FS(Text,6);
HAL_Delay(1000);
}
}in "usbd_cdc_if.c" I set:
#define APP_RX_DATA_SIZE 64
#define APP_TX_DATA_SIZE 64
I compiled my project with no errors.
Debug and Run didn't give any errors but if I open my COM by a terminal...no message appears!
Can you help me?
Thanks and best regards!
