USB 4.0.3 CDC HOST doesn't receive data

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

USB 4.0.3 CDC HOST doesn't receive data

跳至解决方案
1,375 次查看
pedropol
Contributor II

I modified the example from "...\Freescale USB Stack v4.0.3\Source\Host\examples\cdc_serial\cw10\kinetis_l2k" to use it with openSDA on FRDM-KL25Z.

I can send data from Host to CDC device but not from Device to HOST. It doesn't works. Host doesn't receive nothing.

Function  _io_cdc_serial_read always return 0.

If I connect the device to a PC,  I can see in the hyperterminal the data sent, so the problem seems to be on the host.

I need change any specific register initialization code?

This example works correctly in TWRMKL25z ?

标签 (1)
标记 (4)
0 项奖励
回复
1 解答
1,117 次查看
florintoma
NXP Employee
NXP Employee

In the usb_class_cdc_set_acm_ctrl_state() function, at lines 350 / 351 if_acm_ptr->ctrl_state.bmStates[1] should be changed with if_acm_ptr->ctrl_state.bmStates[0]. The problem was that the state was sent on the usb in big endian instead of little endian.

在原帖中查看解决方案

0 项奖励
回复
1 回复
1,118 次查看
florintoma
NXP Employee
NXP Employee

In the usb_class_cdc_set_acm_ctrl_state() function, at lines 350 / 351 if_acm_ptr->ctrl_state.bmStates[1] should be changed with if_acm_ptr->ctrl_state.bmStates[0]. The problem was that the state was sent on the usb in big endian instead of little endian.

0 项奖励
回复