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

Using CLI in a non-blocking configuration?

I've been using the CLI and also piping NRF_Log thru the same backend.  In my application there are alot of time critical operations.  I've noticed with some GPIO toggling for timing debugging that the CLI module is blocking the CPU for long segments of time.  This greatly affects my systems ability to process data in main context.  If I switch over to just using the NRF_Log and no CLI, everything aligns perfectly.  Thus I've concluded that the CLI module is the blocking culprit.  How could I configure or modify the CLI to run in non-blocking mode (using UART backend)?

I see the same issue if I try and use RTT so it seems to be backend agnostic.  I've also tried disabling the Rx task to reduce any "listening" time in the CLI system.  Any help would be greatly appreciated!

Thanks guys,

Parents Reply
  • There are a few ways to decrease time needed for processing CLI, but CLI needs a lot of time for processing, so don't expect major improvement. The less features that are enabled, the faster the processing will be.

    Things that could decrease the processing time:

    1)  Disable colors - it will decrease number of transferred bytes

    2) Increase NRF_CLI_PRINTF_BUFF_SIZE -> Higher value will decrease number of uart peripheral accesses

Children
No Data
Related