Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

CLI lock-up

Good afternoon,

I'm working on troubleshooting an issue we're having in the field.  We are using the CLI libraries to provide an nRF52840-based board with an interface to the host PC over USB CDC ACM using the associated CLI transport.  What we're seeing in the field is that after a certain amount of time (usually days), the module will become unresponsive and lose connection to the host PC.  In local testing, we've narrowed this down to what appears to be a lock-up in the CLI input/output processing.  We've ensured that all input/output on the USB line runs through the CLI library, and we've even instituted a fixed number of commands prior to system reset (via sd_nvic_SystemReset()) to try to work around the problem.  The behavior seems to vary widely between individual boards (these are all ex-Particle Xenon boards), and even between host systems (Windows 10 on Parallels vs. Windows 10 native).  We're using TeraTerm w/ a Macro for 'rapid fire' testing, and serial port speed doesn't seem to effect the outcome.

I've tried playing around with settings for the CLI command / print buffers, and note that setting the print buffer to something like 1024 causes the problem to happen almost instantaneously, whereas a value like 16 for the print buffer seems to allow the program to run for minutes or hours before failure (when executing commands every 500ms).  There are no exceptions being logged via RTT and the Soft Device doesn't seem to be asserting when the lock-ups occur.  It is also very common for the CLI itself to crash, leaving the remainder of the application continuing to run, but without any method of obtaining output from the application any longer.

SDK Version: 15.2

GCC: arm2018-q4

Thanks in advance!

Parents Reply Children
No Data
Related