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

Zephyr CDC_ACM example unstable behaviour

Hi,

We are currently developing a Sensors/USB/BLE/LTE-M1 product for a customer. The board is equipped with one nRF9160,for cloud communication, and one nRF52840, with a lot of sensors, BLE and USB. We have UART or SPI between nRF52840 and nRF9160. We use zephyr for both processors. Product is going into test in Q4 and in production in Q1 2020.

Now to the question:

I am currently trying to add CDC_ACM serial port behaviour to the nRF52840 processor. 

Setup for this example:

  • Hardware:nRF52840 PCA10065 rev 1.0.0
  • Example code: nsc\zephyr\samples\subsys\usb\cdc_acm\
  • Board: nsc\zephyr\boards\arm\nrf52840_pca10056\
  • I have disabled the mass storage device functionality according to Disabling the Mass Storage Device functionality

Problem: The reception of data is not stable. The test has been done on two different boards with similar issues.

Data sent to DUT:

0123456789012345678901234567890123456789012345678901234567890123456789
0123456789012345678901234567890123456789012345678901234567890123456789
0123456789012345678901234567890123456789012345678901234567890123456789
0123456789012345678901234567890123456789012345678901234567890123456789
0123456789012345678901234567890123456789012345678901234567890123456789
0123456789012345678901234567890123456789012345678901234567890123456789
0123456789012345678901234567890123456789012345678901234567890123456789
0123456789012345678901234567890123456789012345678901234567890123456789

Data received from DUT:

0123456789012345678901234567890123456789012345678901234567890123456789
012345678901234567890123456789012345678901234567890123456789012456789
0123456789012345678901234567890123456789012345678901234567890123456789
0123456789012345678901234567890123456789012345678901234567890123456789
0123456789012345678901234567890123456789012345678901234567891245689
0123456789012345678901234567890123456789012345678901234567890123456789
0123456789012345678901234567890123456789012345678901234567890123456789
012345678901234567890123456789012345678034703679456789

Do you have any hints what is wrong? Are there any known issues for nRF52840 causing this?

Are there anything else besides choosing example and board that I need to do? 

/ Per-Ola

Parents Reply
  • Hi again,

    To give an answer to other developer with the same issue:

    The reason why the cdc_acm example is behaving incorrectly for nRF52840, and probably other nRFs, is because it needs two defines to be configured in a proper way, either in the prj.conf file. 


    CONFIG_CDC_ACM_IAD=y
    CONFIG_USB_COMPOSITE_DEVICE=y

    OR preferably in the boards\arm\nrf52840_pca10056\Kconfig.defconfig.

    You might also be forced to set "#define RING_BUF_SIZE"  to a higher value than 1024 depending on how many bytes you send in a bunch.

    / Per-Ola

Children
No Data
Related