How to detect USB CDC break?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to detect USB CDC break?

1,373 Views
spastor
Contributor I

Hello community,

I am wondering how can I detect when a BREAK signal is sent to the USB CDC device. My application is based on the MQX virtual_com sample, so I have run it and tried sending a break to see if any of the two callbacks is called when this happens with no success.

Some background: the aim of this application is basically to do an USB to RS-232 pass-through as part of a bigger project. This means that everything read from the virtual COM port is written into another MQX UART and vice versa. That part is working fine, the problem comes with the break signal: I have to detect when this signal is sent to the virtual COM port so I can propagate it to the MQX UART. Is there any API available that I can use to be notified of this or in the worst case, a polling mechanism?

Thanks for your time. Best regards,

Labels (1)
0 Kudos
Reply
2 Replies

875 Views
soledad
NXP Employee
NXP Employee

Hello Sebastian,

Could you please check the Markku Pulsa suggestion in the following thread (the last activity)?

interrupt or not interrupt uart

Please let me know if this helps


Have a great day,
Sol

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

875 Views
spastor
Contributor I

Hello soledad and thanks for answering. Unfortunately, it seems that I didn't explain myself correctly. What I want to detect in my application is when the host (PC) sends a Break to the CDC (twrk60n512). In the discussion you pointed they seem to be discussing about how to use the UART in interrupt mode or not. What I need to know is how to detect from the USB API the "break received" event.

0 Kudos
Reply