This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Composite device CDC ACM + 2 BULK endpoint IN

Hi everyone,

I'm working with a nRF52840 dongle. I need to add to the CDC ACM example two bulk endpoint IN. My purpose is to realize a firmware that allow real time data transfer from two sensors to the PC host and an auxiliary transfer of system status data using CDC ACM.

Is it possible?

Thanks everyone and sorry for my bad english but i'm sweden.

Parents
  • Hello,

    I am not quite sure I understood your question correctly, but I believe the answer is yes. I didn't understand exactly why you need two different Bulk endpoints IN, but I assume you can do that. If I am not mistaken, the USBD CDC ACM is also a using a bulk transfers. All in all you have 7 Bulk Endpoints. You can read about the bulk endpoints, and bulk interrupt IN and OUT transactions here.

    Best regards,

    Edvin

  • Thanks for your answer.

    I try to explain better my problem. I want to realize a USB composite device. I need the CDC ACM class for transmitting from the dongle to the PC a system status data. I have also two sensors and I want to transmitt the data from these sensors from the dongle to the PC via USB. I want to achieve this using BULK transfer so I think that could be a solution to use the CDC ACM example and add two BULK endpoints.

  • alexlöddeköpinge said:
    I need to transfer packaged real-time data from the sensors to the PC

     And therefore you can't use CDC ACM?

     

    alexlöddeköpinge said:
    For this reason I ask if there is an example that explain how to add to the "CDC ACM example" ANOTHER instance with two bulk IN endpoints.

     Sorry. We don't have any examples that do this. 

    Is the bulk endpoints that you need to use like the one used in the usbd example found in SDK\examples\peripheral\usbd?

  • The bulk endpoints used in the usbd example are for a mouse.

    I try to explain better my situation but it's not so easy due to my english and I'm really sorry for this.

    I have two analog sensors. I use the internal ADC and then I want to transfer these data in package to the PC host. I also need the CDC ACM class so I want to implement a composite device.

    Days before you said me that this is possible but I can't understand how. 

    Is there a way to access directly endpoint and add these? Is there any example of this?

    I really thanks you and I'm sorry for my bad english but I'm working on it.

    Best regards

  • Ok, let us try another approach: What do you use on your PC to read out the sensor data? I still don't understand why you can't use CDC ACM for your sensors.

    To be honest, I am not familiar with the USB Bulk endpoint protocols. Are you? 

     

    alexlöddeköpinge said:
    The bulk endpoints used in the usbd example are for a mouse.

     Yes, but perhaps you can modify the example's bulk endpoint to do what you want to do.

     

    alexlöddeköpinge said:
    Days before you said me that this is possible but I can't understand how. 

     We have an example doing CDC ACM already. I suggest you start with another example and try to implement what you need for your sensors. Only this, no CDC ACM for the moment. And start with only one endpoint, and then when that is working, try to add the other endpoint for the other sensor. When that is working, then try to take what you have written and include it in the USBD_CDC_ACM example.

    BR,

    Edvin

  • Ok, let us try another approach: What do you use on your PC to read out the sensor data? I still don't understand why you can't use CDC ACM for your sensors.

    I will use a host-side software using libusb that can handle bulk transfer.

    To be honest, I am not familiar with the USB Bulk endpoint protocols. Are you? 

    No, I'm not. But now I'm studying bulk transfer here: bulk endpoints, and bulk interrupt IN and OUT transactions

    I still don't understand why you can't use CDC ACM for your sensors.

    Is it possible using CDC ACM to transfer real.time packaged data? At what speed?

    Thanks

    BR

  • The CRC ACM is a virtual COM port. So yes. It is realtime, unless we have different understandings of the term realtime.I am not sure of the throughput. What throughput do you need?

Reply Children
Related