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
  • Hi,

    Please specify exactly what you think lasts a long time. We will then be able to offer more solutions.

    I guess that the matter concerns the function: nrf_cli_process ?
    The most time is spent on this function when CLI has to print out logs at the same time and receives and sends data related to command handling.
    Printing logs requires deleting and reprinting messages on the screen.
    Please write what time of service you are observing and what would be satisfactory for you?

Children
Related