Freescale USB CDC problem receiving the second time

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

Freescale USB CDC problem receiving the second time

789 次查看
punitkumar
Contributor IV

Hi

I'm using Kinetis K64 MCU with freescale USB stack 4.1.1 for USB CDC device (baremetal).

The code is working but only for first receive (connected the virtual serial port to PC terminal), but when i tried to send more bytes ( or even 1 byte), i got nothing to the MCU side.

The way out i've found is i need to send some dummy thing out form MCU USB whenever i received something and after that i can receive the next time.

Can someone identify what the problem is and how to solve?

Thanks in advance

Punit Kumar

标签 (2)
0 项奖励
回复
1 回复

657 次查看
isaacavila
NXP Employee
NXP Employee

Hello PK,

have you made some modifications on example project? Example is using an specific logic that is as follows:

  • After enumeration, device requests to receive data.
  • Once data is received, this data is copied in another auxiliar buffer and then it is sent back to host.
  • Once data is sent, device requests for more data and cycle is repeated.

If you alter the order in this cycle,transactions won't be finished and queue will be filled with transactions that are not completed and system can crash.

You can consult this thread that talks about it: KSDK VCOM example does not work without loopback

If you have any other doubt please let me know it.

Best Regards,

Isaac

----------------------------------------------------------------------------------------------------------------------------------------

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

----------------------------------------------------------------------------------------------------------------------------------------