This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

USB cdc acm driver dependency on DTR

Hi 

      Using demo usbd_cdc_acm and found a very strange bug!

      Even I disabled the flow control of uart , the 52840 device still need to control the DTR signal to ensure UART communiction.

        dcb.BaudRate = ibaund;
        dcb.ByteSize = 8;
        dcb.Parity   = NOPARITY;
        dcb.StopBits = ONESTOPBIT;
		dcb.fOutxCtsFlow = FALSE;
		dcb.fOutxDsrFlow = FALSE;
		dcb.fOutX = FALSE;
		dcb.fInX = FALSE;
		
		//--> key point!! without this dtr control, 52840 device not ready to communication. to  
		dcb.fDtrControl =  DTR_CONTROL_ENABLE;
        
        SetupComm(m_hCOM,0x10000,0x10000);
        if(!SetCommState(m_hCOM, &dcb))
            break;

      Did anyone else found this issue?

Parents Reply Children
No Data
Related