Virtual comport cannot detect disconnect

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

Virtual comport cannot detect disconnect

1,366件の閲覧回数
kensu
Contributor V

Hi , I use the VCOM sample project to make my debug message output from USB Virtual com port. It work.

My evaluation board is MCB1800, I use the "usbd_rom_cdc_vcom" sample project.

But I find if my PC terminal tool(ex: teraTerm) is close or disconnected. The firmware cannot detect it's already disconnect.

How to detect if the terminal is already disconnected in the firmware?

It seems there is no interrupt handler to process the connection is disconnected from PC(connected --> disconnected).

Thanks

Ken

ラベル(5)
タグ(3)
0 件の賞賛
返信
2 返答(返信)

1,140件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi Ken Su,

Thank you for your interest in NXP Semiconductor products and 
the opportunity to serve you.
I wonder whether you can share or tell me the demo you use, then I can replicate the issue on my site.
I'm looking forward to your reply.
Have a great day,

TIC

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

0 件の賞賛
返信

1,140件の閲覧回数
kensu
Contributor V

Hi, the demo is very simple.

In the Cdc_vcom.c code, there si vcom_write API.

I use this API to output debug message, and PC receive it with terminal tool.

Then I close the terminal, I hope the firmware can detect the terminal is closed.

But "pVcom->tx_flags & VCOM_TX_CONNECTED" always show it is connected.

This status can not update.

The only way to detect if the PC terminal is closed is that the busy status is keep. So that the firmware may know the terminal is closed?

Any better method?

Thanks

Ken

0 件の賞賛
返信