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

USB Bulk transfers with the app_usbd library

Hi DevZone,

I want to perform USB bulk transmits to a host device while using the app_usbd library. I am using SDK 15.3 and the s140 soft device is enabled.

I have found the app_usbd_ep_transfer() and app_usbd_ep_handled_transfer() functions in the app_usbd.c file at line 1816 and 1831.

Can I use these directly in my user code and does the library have built in scheduling/handling so I don't run into concurrency issues with the end point I am using?
I have not been able to find information on this in the Nordic info center, and I am having a hard time figuring it out by looking in the library code it self Slight smile

Br. Casper

Parents
  • Hi Casper

    Normally these functions are called in the background by whatever class implementation is running on top. 

    Have you looked into using one of the standard classes, such a CDC, rather than using the app_usbd library directly?

    I can check with the developer if there are any particular considerations to take when using app_usbd directly. 

    Best regards
    Torbjørn 

  • Hi ovrebekk, (Edit, misspelled name)

    Sorry for the very late reply, I have been attending a course that took 100% of my time these past days.

    I have not been looking into the SDK implementation of the USB CDC class directly. This is because the research I did on it showed that it works as a Virtual Serial Port. By this I assume that it would be like using UART with and FTDI and the connecting with a terminal program such as Termite or PuTTY. 

    The planned use of the USB interface is:
     - Using the USB to send and receive commanding/telemetry between the host PC and the nRF52840 chip.
     - Sending data log files from the FATFS system on the nRF52840 to a host PC as fast as possible, as these can be large.

    Have I misunderstood how the CDC works or would it actually work well for my application?

    Br. Casper

Reply
  • Hi ovrebekk, (Edit, misspelled name)

    Sorry for the very late reply, I have been attending a course that took 100% of my time these past days.

    I have not been looking into the SDK implementation of the USB CDC class directly. This is because the research I did on it showed that it works as a Virtual Serial Port. By this I assume that it would be like using UART with and FTDI and the connecting with a terminal program such as Termite or PuTTY. 

    The planned use of the USB interface is:
     - Using the USB to send and receive commanding/telemetry between the host PC and the nRF52840 chip.
     - Sending data log files from the FATFS system on the nRF52840 to a host PC as fast as possible, as these can be large.

    Have I misunderstood how the CDC works or would it actually work well for my application?

    Br. Casper

Children
Related