AnsweredAssumed Answered

USB 4.0.3 CDC HOST example doesn't receive data

Question asked by pedropol on Feb 7, 2013
Latest reply on Feb 10, 2013 by Florin Catalin Toma

I'm using the example for Freescale USB Stack v4.0.3\ProcessorExpert\Examples\Host\CDC\USB_CDC_HOST_MKL25Z128_PEx on FRDM-KL25Z board.

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've use the size of reception buffer like num parameter but also I've tried  other different values (1; 8 ; 16 ) but nothing.

Message to receive is sent correctly to the queue.


I set a breakpoint in usb_class_cdc_in_data_callback funtion (usb_host_cdc.c file) and the line "acm_if_ptr->ctrl_state.bmStates[1] & USB_ACM_LINE_STATE_DTR  always set "len" to 0


If acm_if_ptr->ctrl_state.bmStates[1] is not  USB_ACM_LINE_STATE_DTR  is the reception disabled?

Where, and when,   is acm_if_ptr->ctrl_state.bmStates[1] set?


Where I must to set other breakpoints to debug and check if data is arriving or not?



Outcomes