Helpful ReplyHot!What is the criteria for selecting the number of endpoints? (USB & Harmony)

Author
DominusT
Super Member
  • Total Posts : 1276
  • Reward points : 0
  • Joined: 2005/07/22 08:31:18
  • Status: offline
2019/03/19 09:40:15 (permalink)
0

What is the criteria for selecting the number of endpoints? (USB & Harmony)

Hi.
 
I managed to get the example named CDC_COM_PORT_SINGLE_DEMO to work on the PIC32MZ Curiosity board.


By default the example has by default the number of endpoints used equal to 2.

Can you get some kind of advantage or improvement in communication if that number is larger?

Any suggestion or comment is welcome




post edited by DominusT - 2019/03/19 10:20:24
#1
andersm
Super Member
  • Total Posts : 2567
  • Reward points : 0
  • Joined: 2012/10/07 14:57:44
  • Location: 0
  • Status: online
Re: What is the criteria for selecting the number of endpoints? (USB & Harmony) 2019/03/19 10:03:44 (permalink)
0
Look in the device class specification for what endpoints the device needs and/or can use.
#2
MisterHemi
Junior Member
  • Total Posts : 100
  • Reward points : 0
  • Joined: 2017/11/02 12:24:21
  • Location: 0
  • Status: offline
Re: What is the criteria for selecting the number of endpoints? (USB & Harmony) 2019/03/19 20:10:49 (permalink)
0
Basically.... an endpoint represents an input or an output (except endpoint 0 which is bi-directional).
 
So in the example one endpoint is an OUT and the other is an IN.
 
There is no performance increase by adding more endpoints.... but additional endpoints may be added for other types of transfers, such as: Interrupt, Bulk, Isochronous, or Control ( e.g. - endpoint 0).
 
 

My configuration:
MacBook Pro (Retina, 15-inch, Mid 2015) with MacOS High Sierra (10.13.3) and MPLAB X IDE v4.15
 
Curiosity PIC MZ EF, PIC24F Curiosity, and XPRESS EVAL BOARD (PIC16F18855).
#3
DominusT
Super Member
  • Total Posts : 1276
  • Reward points : 0
  • Joined: 2005/07/22 08:31:18
  • Status: offline
Re: What is the criteria for selecting the number of endpoints? (USB & Harmony) 2019/03/20 09:14:21 (permalink)
0
MisterHemi
Basically.... an endpoint represents an input or an output (except endpoint 0 which is bi-directional).
 
So in the example one endpoint is an OUT and the other is an IN.
 
There is no performance increase by adding more endpoints.... but additional endpoints may be added for other types of transfers, such as: Interrupt, Bulk, Isochronous, or Control ( e.g. - endpoint 0).
 
 

It seems like this, to emulate a simple COM port on USB only 2 enpoints are needed and therefore you can send or receive up to 64 bytes maximum, increasing the number of endpoints doesn't increase the number of bytes that can be sent or received.
#4
MisterHemi
Junior Member
  • Total Posts : 100
  • Reward points : 0
  • Joined: 2017/11/02 12:24:21
  • Location: 0
  • Status: offline
Re: What is the criteria for selecting the number of endpoints? (USB & Harmony) 2019/03/20 12:26:37 (permalink) ☄ Helpfulby DominusT 2019/03/20 12:29:44
5 (1)
DominusT
MisterHemi
Basically.... an endpoint represents an input or an output (except endpoint 0 which is bi-directional).
 
So in the example one endpoint is an OUT and the other is an IN.
 
There is no performance increase by adding more endpoints.... but additional endpoints may be added for other types of transfers, such as: Interrupt, Bulk, Isochronous, or Control ( e.g. - endpoint 0).
 
 

It seems like this, to emulate a simple COM port on USB only 2 enpoints are needed and therefore you can send or receive up to 64 bytes maximum, increasing the number of endpoints doesn't increase the number of bytes that can be sent or received.




Correct, however you can set the buffer size for the endpoint. It's multiples of 8, for example: 8, 16, .... 4096.
It's briefly described (but not in depth) in the data sheet.
 
I wrote a simple open source USB stack for the PIC32MZ which can be found here:
https://www.microchip.com/forums/m1083508.aspx

I think I may have noted which data sheet and page number. Look at the comments in the code.
I may possibly add a USB MIDI example to that thread, but i'm not sure yet, which has some updates
and shows how to send longer, more detailed Configuration Descriptors.

My configuration:
MacBook Pro (Retina, 15-inch, Mid 2015) with MacOS High Sierra (10.13.3) and MPLAB X IDE v4.15
 
Curiosity PIC MZ EF, PIC24F Curiosity, and XPRESS EVAL BOARD (PIC16F18855).
#5
Jump to:
© 2019 APG vNext Commercial Version 4.5