How to detect USB CDC break?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to detect USB CDC break?

1,375件の閲覧回数
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,

ラベル(1)
0 件の賞賛
返信
2 返答(返信)

877件の閲覧回数
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 件の賞賛
返信

877件の閲覧回数
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 件の賞賛
返信