Author Topic: Using an Endpoint as Input  (Read 13009 times)

gbr

  • Member
  • ***
  • Posts: 23
Using an Endpoint as Input
« on: November 05, 2010, 02:05:36 am »
Hello Jan,

There is a point that I'd like to clarify  in the use of an Endpoint for input

There are , I think , 2 possibilities

1 Although the EndPoint is defined as Interrupt driven ,Sending a "continuous" stream of data I.E as soon as the BDSTAT of the ENDpoint IN is passed back to the program from the SIE,This does not uses interrupt ,I think
If I am correct , the last entry in the EndPoint Descriptor,the bInterval value is ignored ??

2 Make use of the interrupt flag TRNIF(in Microchip 18F's)   and send only when the interrupt is serviced ,the interval would then be applicable and the rate of Data reports would be function of the inverse of the value
Of course that implies that the Host needs to request the data at the rate described in the interval value

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Using an Endpoint as Input
« Reply #1 on: November 05, 2010, 09:25:07 am »
USB interrupt endpoints are interrupt-like because they have a guaranteed maximum latency.

An IN endpoint sends data only on receiving an IN token packet from the host.

When firmware has data to send on an interrupt IN endpoint, it arms the endpoint (in a device-specific way as described in the data sheet). On receiving an IN token packet, the hardware sends the data out and typically triggers an interrupt to inform the firmware that it can now re-arm the endpoint with new data to send on the next IN packet.
 
Jan