Skip to content

Commit 69a0447

Browse files
committed
modules: shell: Remove power management handling
Remove power management handling and ping command from the shell module. Power mgmt handling will be added to the battery --> power module. And pong command is not needed anymore. These changes removed the need of having a separate thread in the shell module. Which saves some memory. Signed-off-by: Simen S. Røstad <simen.rostad@nordicsemi.no>
1 parent 075b207 commit 69a0447

File tree

4 files changed

+47
-324
lines changed

4 files changed

+47
-324
lines changed

app/prj.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ CONFIG_APP_LOG_LEVEL_DBG=y
205205

206206
# Task Watchdog
207207
CONFIG_TASK_WDT=y
208-
CONFIG_TASK_WDT_CHANNELS=9
208+
CONFIG_TASK_WDT_CHANNELS=8
209209
CONFIG_TASK_WDT_MIN_TIMEOUT=10000
210210

211211
# Device power management

app/src/modules/fota/fota.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,10 @@ static void state_polling_for_update_entry(void *o)
316316
SEND_FATAL_ERROR();
317317
}
318318
break;
319+
case -ENOTRECOVERABLE:
320+
__fallthrough;
319321
case -ENETUNREACH:
320-
LOG_WRN("Network is unreachable");
322+
LOG_WRN("Failed to poll for a FOTA update, network is unreachable");
321323
break;
322324
case -ENOENT:
323325
LOG_DBG("FOTA job finished, status reported to nRF Cloud");

app/src/modules/shell/Kconfig.shell

+1-31
Original file line numberDiff line numberDiff line change
@@ -11,40 +11,10 @@ menuconfig APP_SHELL
1111
imply AT_SHELL
1212
default y
1313
help
14-
Adds a zbus shell. The shell command is called
15-
"zbus" and will interpret arguments as zbus commands, and print back the
16-
response.
14+
Shell that adds usefaul commands to control certain aspects of the application.
1715

1816
if APP_SHELL
1917

20-
config APP_SHELL_THREAD_STACK_SIZE
21-
int "Thread stack size"
22-
default 1024
23-
24-
config APP_SHELL_WATCHDOG_TIMEOUT_SECONDS
25-
int "Watchdog timeout"
26-
default 120
27-
help
28-
Timeout in seconds for the shell module watchdog.
29-
The timeout given in this option covers both:
30-
* Waiting for an incoming message in zbus_sub_wait_msg().
31-
* Time spent processing the message, defined by
32-
CONFIG_APP_SHELL_MSG_PROCESSING_TIMEOUT_SECONDS.
33-
Ensure that this value exceeds CONFIG_APP_SHELL_MSG_PROCESSING_TIMEOUT_SECONDS.
34-
A small difference between the two can mean more frequent watchdog feeds, which increases
35-
power consumption.
36-
37-
config APP_SHELL_MSG_PROCESSING_TIMEOUT_SECONDS
38-
int "Maximum message processing time"
39-
default 3
40-
help
41-
Maximum time allowed for processing a single message in the module's state machine.
42-
The value must be smaller than CONFIG_APP_SHELL_WATCHDOG_TIMEOUT_SECONDS.
43-
44-
config APP_SHELL_UART_PM_ENABLE
45-
bool "Enable UART power management feature"
46-
default y
47-
4818
module = APP_SHELL
4919
module-str = SHELL
5020
source "subsys/logging/Kconfig.template.log_config"

0 commit comments

Comments
 (0)