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

CLI and wait_for_event

I am using ATT MTU throughput example and I noticed that using CLI (calling cli_start) causes the main while(1) loop forever. In other words, wait_for_event does not block until it gets an event. I verified it using the breakpoint.

Is there a way to use CLI and also block until we get an event?

I am using nRF52840 and S140 nRF5_SDK_14.2.0.

Parents
  • Thanks for pointing it out. I see CLI_UART_RX_TIMEOUT is set to 100 in nrf_cli_uart.c.

    Is there a way to wake up the SoC when a command is received (for example carriage return is entered on the serial terminal)? That way, we don't need a timer and SoC sleeps for most of the time.

    The cli_uart_enable takes a parameter "blocking". What is this used for? Is there a way for application to set this blocking flag to TRUE ?

Reply
  • Thanks for pointing it out. I see CLI_UART_RX_TIMEOUT is set to 100 in nrf_cli_uart.c.

    Is there a way to wake up the SoC when a command is received (for example carriage return is entered on the serial terminal)? That way, we don't need a timer and SoC sleeps for most of the time.

    The cli_uart_enable takes a parameter "blocking". What is this used for? Is there a way for application to set this blocking flag to TRUE ?

Children
No Data
Related