This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DK-TM4C129X: How to get USBCDC class error message in a windows app?

Part Number: DK-TM4C129X

# HW: DK-TM4C129X

# MCU FW: TivaWare_C_Series-2.2.0.295 example code usb_dev_serial

(under C:\ti\TivaWare_C_Series-2.2.0.295\examples\boards\dk-tm4c129x)

# device driver: 

--------------------------------------------------------------------------------------------------------

I set this comport   as 115200bps, space parity , 1 stop bit, and send a data '0' with mark parity.

Which will produce a error message under bushound:

  

which reports break detection and parity error to host.

My question is how to get this message in a visual C++ app?

I tried the api 

 1. ClearCommError(handle, &comError, NULL) or 

 2. WaitCommEvent(hanle, &dwCommEvent, &osStatus)

But it will not get an error message notification.

Any suggested to get this notification?
 

  

  • Hi,

      I'm not sure I fully understand your problem. A few comments and questions.

      - I assume you use the C:\ti\TivaWare_C_Series-2.2.0.295\windows_drivers\usb_dev_cserial.inf as the driver information file for Windows. 

      - Is the example working for you? I run the same example on the DK board and it is working for me. Please see below my terminal window configuration and the DK board screen when I type something on the terminal window. As you can see the RX bar is showing the number of characters I type on the terminal window. 

    My question is how to get this message in a visual C++ app?

    I tried the api 

     1. ClearCommError(handle, &comError, NULL) or 

     2. WaitCommEvent(hanle, &dwCommEvent, &osStatus)

    But it will not get an error message notification.

    Any suggested to get this notification?

    Are you intentionally trying to send a character from the host (your PC) to the DK board with a parity error?

    I suppose the DK board is responding with the correct parity status. 

    If your question is on how to display the error message on some Windows visual C++ app, then I cannot help you. I have not much knowledge on the Windows side. We can only support you on the MCU side. 

  • Hi, Charles:

    Thanks for the response!

    1. Yes, I use the C:\ti\TivaWare_C_Series-2.2.0.295\windows_drivers\usb_dev_cserial.inf  as the driver information file for Windows. 

    2. Is the example working for you?

        Yes, I can send and get data no problem.

    3. Are you intentionally trying to send a character from the host (your PC) to the DK board with a parity error?

      Yes, I am intentionally trying to send a character from the Windows host to the DK board with a parity error. And my application expects to get a notification with a parity error. But I don't know how  to get the notification in a C++ application.

      My application needs to the the parrity error for a further action.

      Anyone who knows how to get the notification for parity error, or where should I put my question?