Author Topic: Pause USB CDC  (Read 9644 times)

thomas_rudloff

  • Member
  • ***
  • Posts: 2
Pause USB CDC
« on: December 23, 2018, 07:41:27 pm »
I wrote a HS USB CDC driver for an Atmel SAM3X. This works fine though the interrupt endpoint only returns ZLPs. Now Windows polls 8000 times a second the IN endpoint which causes a lot of load on the PC. I suggest an interrupt message could pause polling. How should this look like in detail? It is not my first USB driver but I am not familiar with CLASS interfaces so a somewhat more detailed answer is appreciated. Or can I set the polling rate to a longer time?

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Pause USB CDC
« Reply #1 on: December 23, 2018, 09:33:44 pm »
Interrupt IN endpoints are intended for data that may arrive at any time, which is why they use polling. The endpoint descriptor can increase the max latency between polls, but the host may poll more often if it wishes.

It does waste bandwidth if there is seldom any data to send; think of a mouse; hours can go by between mouse movements.


thomas_rudloff

  • Member
  • ***
  • Posts: 2
Re: Pause USB CDC
« Reply #2 on: December 24, 2018, 09:08:15 am »
I was not clear. The INTERRUPT endpoint is not the problem. The IN endpoint is polled to often even though there is no data available. Can't I tell in the INTERRUPT that the modem is not ready or something like this? Does Windows stop polling until I tell in another INTERRUPT that the modem is online again? When I do a transmission it is OK that it takes CPU. When my device is idle I do not like it to load the host PC. Even because Windows 7 seems to take more and more CPU after every update.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Pause USB CDC
« Reply #3 on: December 26, 2018, 12:39:58 pm »
Interrupt endpoints by definition are for data that arrives at unpredictable times. If the host disabled polling, the endpoint would have no way to signal that it had data.