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

USBD ISO endpoint through COM port (CDC_ACM) ?

Hi,

I'm working with the USB_CDC_ACM example to communicate with a PC trough COM port. It works well.

Now I would like to use the ISO endpoint feature in order to transfer data from nrf52840 to PC with a better bit rate.

First, Is the ISO endpoint feature can work with CDC_ACM example ? If yes, How do you configure it ?

Thanks!

Ivan.

Parents
  • se the ISO endpoint feature in order to transfer data from nrf52840 to PC with a better bit rate.

    Iso EP won't give you a better rate than bulk EP when correctly programmed.

    USB CDC (ACM) does not support iso endpoints.

  • Hi Turbo,

    thanks for the answers!

    what is the best way to send data with the app_usbd_cdc_acm_write() function ? 

    what i'm currently doing is call the write function when I get the TX_DONE event: 

    case APP_USBD_CDC_ACM_USER_EVT_TX_DONE:
        if(cpt_page < nb_page)
            {
                app_usbd_cdc_acm_write(&m_app_cdc_acm, m_buffer_usb_tx,strlen((const char*)m_buffer_usb_tx));
                cpt_page++;
            }
        break;

    Is there a recommanded size (or maximum size) for the data buffer to reach the maximum bit rate ?

  • Hello Ivan,

    IvanDouge said:
    what i'm currently doing is call the write function when I get the TX_DONE event: 

    You may start the new transfer somewhere else in your code, but you will need to make sure that you have received the APP_USBD_CDC_ACM_USER_EVT_TX_DONE event before you initiate the next write - calling write as you do is the earliest possible safe place to do so, so if back-to-back writes is what you are going for then the answer is: yes, this is the best place to initiate the next write.

    IvanDouge said:
    Is there a recommanded size (or maximum size) for the data buffer to reach the maximum bit rate ?

    That depends on the device you are writing to.
    Please see this discussion for more detail on the limitations of the USBD CDC ACM for Linux and Windows 10.

    Best regards,
    Karl

Reply
  • Hello Ivan,

    IvanDouge said:
    what i'm currently doing is call the write function when I get the TX_DONE event: 

    You may start the new transfer somewhere else in your code, but you will need to make sure that you have received the APP_USBD_CDC_ACM_USER_EVT_TX_DONE event before you initiate the next write - calling write as you do is the earliest possible safe place to do so, so if back-to-back writes is what you are going for then the answer is: yes, this is the best place to initiate the next write.

    IvanDouge said:
    Is there a recommanded size (or maximum size) for the data buffer to reach the maximum bit rate ?

    That depends on the device you are writing to.
    Please see this discussion for more detail on the limitations of the USBD CDC ACM for Linux and Windows 10.

    Best regards,
    Karl

Children
No Data
Related