USB 4.0.3 CDC HOST doesn't receive data

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USB 4.0.3 CDC HOST doesn't receive data

Jump to solution
751 Views
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 ?

Labels (1)
Tags (4)
0 Kudos
1 Solution
493 Views
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.

View solution in original post

0 Kudos
1 Reply
494 Views
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 Kudos