"usb_cdc_acm: Ring buffer full, drain buffer" repeats on boot

I'm developing code for the xiao_ble board in nRF Connect using Visual Studio, currently working with the ble light_switch example. I'm using the logger module rather than eg printk() as for whatever reason printk() doesn't come through the USB connector (not the point of this question). However, every time I boot the board, I see the following:

The number of messages dropped ranges anywhere from 10 to over 100. I observed these before I enabled the logger module, ie they were already present before I modified any code in the example. I added the following lines to my proj.conf, but this didn't fix anything:

Is there a simple fix? Regular logging works fine after all the "Ring buffer full" messages have finished.

Parents Reply
  • Hi,

     

    ZacMid007 said:

    However, going back to the light_switch example and changing the ring buf size to 4096, now I see this on boot (but not every time, maybe 1 in 3 times when I boot the device):

    Good to hear that the issue is improving.

    "device not ready" means that the port hasn't been opened from the PC yet. The logger module will buffer a given amount of strings, which is the reason why you're getting those error prints when it finally has opened up the port. Other log messages should appear, and if you want printk to be processed by the log module, you can set "CONFIG_LOG_PRINTK=y"

     

    Kind regards,

    Håkon

Children
Related