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:
    so I think that could be a solution to use the CDC ACM example and add two BULK endpoints.

     I agree that this sounds like a viable solution. Alternatively, you could send your sensor data using the CDC ACM as well, unless you need the sensor data to be tranferred to the computer in a particular protocol. 

    If we consider the CDC ACM as a serial port, you can use a simplified protocol:

    S1: data1, S2: data2, SM: State

    Or something like that, sending S1 for sensor 1, S2 for sensor 2 and SM for the state of the state machine, and then you can handle these messages from the computer. 

    But if you need the sensors to use bulk endpoints directly, then your approach sounds like the one that I would attempt as well.

    Best regards,

    Edvin

  • I need to transfer packaged real-time data from the sensors to the PC. So I want to use bulk endpoints. I think I could use also isochronous endpoint but first I want to try  bulk endpoint. 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. I really hope you could help me. Thank you and await your answer.

    Best regards and have a nice day.

  • 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?

Reply Children
Related