Gast
#3050661
Hallo zusammen, Ich habe VCP für USB-FS initialisiert und es funktioniert, wie kann ich Nachrichten die vom PC geschickt werden an STM32 empfangen? int main(void) { __IO uint32_t i = 0; /*!< At this stage the microcontroller clock setting is already configured, this is done through SystemInit() function which is called from startup file (startup_stm32fxxx_xx.s) before to branch to application main. To reconfigure the default setting of SystemInit() function, refer to system_stm32fxxx.c file */ USBD_Init(&USB_OTG_dev, #ifdef USE_USB_OTG_HS USB_OTG_HS_CORE_ID, #else USB_OTG_FS_CORE_ID, #endif &USR_desc, &USBD_CDC_cb, &USR_cb); /* Main loop */ while (1) { if (i++ == 0x100000) { STM_EVAL_LEDToggle(LED1); STM_EVAL_LEDToggle(LED2); STM_EVAL_LEDToggle(LED3); STM_EVAL_LEDToggle(LED4); i = 0; } } }