RTS on USB CDC device

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

RTS on USB CDC device

跳至解决方案
1,943 次查看
Teckna
Contributor V

Hi everyone,

My device acts as a USB CDC device, my system is CW 10.2 and MQX 3.8.1; the communication channel needs a hardware flow control, I need to simulate the RTS signal to the host (and to get the simulated host CTS signal, of course!).

How can I implement this mechanism?

Is a notification event or an application event?

Many thanks

Teckna

标签 (1)
标记 (5)
0 项奖励
回复
1 解答
842 次查看
DavidS
NXP Employee
NXP Employee

Hi Teckna,

I'm not USB expert at all (can spell it and plug mouse/keyboard/USB_Stick in).

Have you looked at the MQX example and its _README.pdf?

C:\Freescale\Freescale MQX 3.8b1\usb\device\examples\cdc\virtual_com

Page 6 has:

The USB_Notif_Callback, which is part of the callbacks initialized by

TestApp_Init is a callback function that the CDC class code uses to

signal to the user that a CDC event has happened. The four conditions

it handles are DTE activation and deactivation (for compatibility with

hardware flow control as in traditional UARTs), data received, and send

complete. The DTE conditions set and clear the start_transactions

variable which is tested in receive and send condition checks to make

sure data can be sent or received.

Hope this helps.

Regards,

David

在原帖中查看解决方案

0 项奖励
回复
2 回复数
843 次查看
DavidS
NXP Employee
NXP Employee

Hi Teckna,

I'm not USB expert at all (can spell it and plug mouse/keyboard/USB_Stick in).

Have you looked at the MQX example and its _README.pdf?

C:\Freescale\Freescale MQX 3.8b1\usb\device\examples\cdc\virtual_com

Page 6 has:

The USB_Notif_Callback, which is part of the callbacks initialized by

TestApp_Init is a callback function that the CDC class code uses to

signal to the user that a CDC event has happened. The four conditions

it handles are DTE activation and deactivation (for compatibility with

hardware flow control as in traditional UARTs), data received, and send

complete. The DTE conditions set and clear the start_transactions

variable which is tested in receive and send condition checks to make

sure data can be sent or received.

Hope this helps.

Regards,

David

0 项奖励
回复
842 次查看
richardtseng
Contributor I

In our case:

PC host == DTE

K60 CDC device == DCE

In the MQX USB CDC example, USB_Notif_Callback() shows how K60 DCE can handle CDC activation/deactivation signal from DTE.

How about sending CDC activation/deactivation signal from K60 DCE to DTE ? Is there a USB device API to send activation/deactivation signal ?

Thanks,

Richard

0 项奖励
回复