Question
STM32F446RE Nucleo 64
Posted on October 24, 2016 at 16:39
Hi Guys,
i try to experiment a bit with the USB CDC library. Sadly I don't get it to work out of the box after I configured everything in STMCubeMX.I tried to learn something from the F4 firmware libraray tutorial projects on CDC. But I find it quite complicated to understand, since there's a complete different board used and also an USART used for communicating.Basically I want to configure my STM446RE to behave as a USB CDC device with messages send over parallel port as a VCP device. But when I run the program Windows doesn't recognize my new device. Just the one created by the STV/Link debugger.To send data over USB I added a message which I send in main while(1) loop:/* USER CODE BEGIN 0 */uint8_t HiMsg[] = ''hello HHI\r\n'';/* USER CODE END 0 */int main(void){ /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ /* MCU Configuration----------------------------------------------------------*/ /* 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_TIM3_Init(); MX_TIM2_Init(); MX_USB_DEVICE_Init(); MX_USART3_UART_Init(); /* USER CODE BEGIN 2 */ /* USER CODE END 2 */ /* Infinite loop */ /* USER CODE BEGIN WHILE */ while (1) { CDC_Transmit_FS(HiMsg, strlen(HiMsg)); HAL_Delay(500); } /* USER CODE END 3 */}Would be glad if someone could help.Thanks!