Skip to main content
Visitor II
January 7, 2022
Question

PCB (that has STM32F407 as MCU and USB CDC interface is running without error) is not recognized by PC( windows 10).

  • January 7, 2022
  • 2 replies
  • 849 views

The STM32F407 is programmed with STMCube IDE and there is no error during initizalition of the functions; HAL_Init(), SystemClock_Init(); MX_USB_DEVICE_Init().

As I expect that virtual com port will be opened while the PCB is plugged into my PC, unfortunately it didnot happen.

What should I do?

    This topic has been closed for replies.

    2 replies

    Super User
    January 7, 2022

    Which OTG? If FS, DFU works? The same (presumably minimal) firmware works on a "known good" board such as Nucleo/Disco/Eval?

    JW

    Visitor II
    January 7, 2022

    Sorry for incomplete information. USB OTG HS. But actually I didnt use any Nucleo/Disco/Eval, I am using designed PCB

    Visitor II
    January 7, 2022

    When the problem is localized, the transmit function of "CDC_Transmit_HS" returnes with "return USBD_BUSY".

    uint8_t CDC_Transmit_HS(uint8_t* Buf, uint16_t Len)

    {

    uint8_t result = USBD_OK;

    /* USER CODE BEGIN 12 */

    USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef*)hUsbDeviceHS.pClassData;

    if (hcdc->TxState != 0){

    return USBD_BUSY;

    }

    But, I want to say that the windows PC doesnot recognize the STM MCU ( no Virtual ComPort )