This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to increase number of endpoints

Hi,

I am stuck at the point where the endpoints at my disposal are not enough to fulfill the functional requirements. I am using lpc3131 from NXP and it provides 3 endpoints ( excluding 1 control EP). But my device communicates at 4 endpoint addresses. So, is there a way that i can share a physical endpoint with two logical pipes so that when host requests data from device's two endpoints say 81 and 85 , but only available being 81 , request at 85 is also serviced by the 81 or 82 or 83( as only 3 are available)?

Parents
  • Because my requirement says that data will be put only on EP 85 but processor does not support EP 5 . Also, i am able to make logical connection i.e pipe between host and EP5 in firmware and somehow or through multiplexing i need to use these available EPs(81,82,83) to work as EP85. Elaborate on multiplexing with respect to this as i am unclear. and correct me if my logic of this endpoint problem is not correct.

    Thanks

Reply
  • Because my requirement says that data will be put only on EP 85 but processor does not support EP 5 . Also, i am able to make logical connection i.e pipe between host and EP5 in firmware and somehow or through multiplexing i need to use these available EPs(81,82,83) to work as EP85. Elaborate on multiplexing with respect to this as i am unclear. and correct me if my logic of this endpoint problem is not correct.

    Thanks

Children
  • > Because my requirement says that data will be put only on EP 85

    The requirement is unreasonable. Maybe, it was made by those who don't know USB well. As a specialist of MCU, you have to point it out. And change the requirement. Teach them about above good coding practice on PC side.

    Tsuneo

  • A multiplexed solution would ask on an end point: "any data".

    And the MCU would check if it has data on ADC0 or ADC1 or ADC2 or ADC3. If any data is available, it would send back not only one or more measurements but also one or more bytes informing which channel the measurements was taken from.

    So the result may be:
    C0: 0 samples
    C1: 0 samples
    C2: 2 samples (13.7, 15.2)
    C3: 1 sample (199.1)

    The PC application then gets this data and demultiplex it. Nothing on 0. Nothing on 1. 13.7 and 15.2 on channel 2. 199.1 on channel 3.

    It's only when a read would also perform some form of auto-acknowledge in your device that the multiplexing gets problematic - maybe you did not want to read out and acknowledge channel3. Multiplexing in a single endpoint will not allow you to leave the C3 sample in the device. This means that the PC must be able to consume data from all multiplexed channels since it can't just freeze a single channel for a while unless you send data in the other direction to your MCU to inform it that you want to pause C3 retrieval.

  • I feel sure with the statement you made. Thanks for your support.

  • I get that now . Will be back to you for that kind of problem.

    Thanks

  • Show this "absolute" feature of the MCU USB engine to the client.
    And discuss on a new requirement, which fits to this MCU.

    The USB device engine on LPC3131 provides three OUT and three IN endpoints, other than the default one.
    - These endpoints work at the same time, independently each other.
    - The endpoint addresses are fixed - OUT: 0x01, 0x02, 0x03, IN: 0x81, 0x82, 0x83
    - The available transfer type for each endpoint is defined in the Table 80, "1.5 Fixed endpoint configuration" section on the datasheet.

    Tsuneo