Reading DSR and CTS in MCUXpresso USB stack

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

Reading DSR and CTS in MCUXpresso USB stack

跳至解决方案
1,886 次查看
ugljesa_tomanov
Contributor I

Hello,

We are using USB port on K28 to communicate with a modem in CDC mode. Is it possible to read the state of simulated CTS and DSR lines in MCUXpresso USB stack?

Thanks

Ugljesa

标签 (1)
0 项奖励
回复
1 解答
1,697 次查看
FelipeGarcia
NXP Employee
NXP Employee

Hi Ugliesa,

 

Unfortunately, that is not possible, I recommend you to check also the SerialState this contains the current state of carrier detect, transmission carrier, break, ring signal, and device overrun error. Please check below snippet from PSTN specification (document attached).

pastedImage_2.png

I hope this is helpful.

 

Best regards,

Felipe

在原帖中查看解决方案

6 回复数
1,697 次查看
ugljesa_tomanov
Contributor I

Hi Felipe,

Yes, our device is host. The idea is to use RTS-CTS synchronization with modem.

Regards

Ugljesa

0 项奖励
回复
1,697 次查看
ugljesa_tomanov
Contributor I

Hi Felipe,

Thank you on your answer.

If I understand correctly function USB_HostCdcSetAcmCtrlState is controlling the output lines (RTC and DTR). We need to detect changes in the input line state. USB_HostCdcGetAcmLineCoding function is used to get DSR state but I am not able to find how to detect CTS.

Best regards

Ugljesa

0 项奖励
回复
1,698 次查看
FelipeGarcia
NXP Employee
NXP Employee

Hi Ugliesa,

 

Unfortunately, that is not possible, I recommend you to check also the SerialState this contains the current state of carrier detect, transmission carrier, break, ring signal, and device overrun error. Please check below snippet from PSTN specification (document attached).

pastedImage_2.png

I hope this is helpful.

 

Best regards,

Felipe

1,697 次查看
ugljesa_tomanov
Contributor I

Hi Felipe,

Thank you very much for your answer.

Best regards

Ugljesa

0 项奖励
回复
1,697 次查看
FelipeGarcia
NXP Employee
NXP Employee

Hi Ugliesa,

 

Please check USB_HostCdcTask in host_cdc.c, in kUSB_HostCdcRunGetStateDone you set the control state.

 

USB_HostCdcSetAcmCtrlState function implements CDC ControlLineState request.

 

Hope it helps!

 

Best regards,

Felipe

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

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励
回复
1,697 次查看
FelipeGarcia
NXP Employee
NXP Employee

Hi Ugliesa,

 

Are you using USB stack as host or device?

 

Regards,

Felipe

0 项奖励
回复