Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
simensrostad committed Jan 24, 2025
1 parent 603b210 commit 52ab5ff
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/nrf/libraries/debug/memfault_ncs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ If at any point the network is lost during the retry process, the library waits

This feature is useful when you want to post the coredump as soon as possible after a crash and it is not desirable to wait for the next periodic upload set by :kconfig:option:`CONFIG_MEMFAULT_HTTP_PERIODIC_UPLOAD_INTERVAL_SECS`.
Alternatively, you can manually trigger the coredump upload by calling the function :c:func:`memfault_zephyr_port_post_data`.
The :c:function:`memfault_coredump_has_valid_coredump` function can be used to check if a coredump is available.
The :c:func:`memfault_coredump_has_valid_coredump` function can be used to check if a coredump is available.

Configuration options in Memfault SDK
=====================================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ nRF Machine Learning (Edge Impulse)
Serial LTE modem
----------------

* Added overlay :file:`overlay-memfault.conf` to enable Memfault.
* Added an overlay :file:`overlay-memfault.conf` file to enable Memfault.
For more information about Memfault features in |NCS|, see :ref:`mod_memfault`.
* Updated the application to use the :ref:`lib_downloader` library instead of the deprecated :ref:`lib_download_client` library.

Expand Down Expand Up @@ -618,7 +618,7 @@ Memfault integration
--------------------

* Added a new feature to automatically post coredumps to Memfault when network connectivity is available.
This feature can be enabled by setting the :kconfig:option:`MEMFAULT_NCS_POST_COREDUMP_ON_NETWORK_CONNECTED` Kconfig option to ``y``.
To enable this feature, set the :kconfig:option:`MEMFAULT_NCS_POST_COREDUMP_ON_NETWORK_CONNECTED` Kconfig option to ``y``.
Only supported for nRF91 Series devices.

AVSystem integration
Expand Down
9 changes: 9 additions & 0 deletions modules/memfault-firmware-sdk/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,18 @@ config MEMFAULT_NCS_POST_COREDUMP_ON_NETWORK_CONNECTED
Post coredump to Memfault when the device is connected to LTE network.
This option is only supported for nRF91 targets.

config MEMFAULT_NCS_POST_COREDUMP_AFTER_INITIAL_DELAY
bool "Post coredump after initial delay"
default y
help
Delay coredump posting to Memfault to avoid conflicts with the application's
TLS connection setup that occurs typically LTE network is obtained.
The delay duration is defined by CONFIG_MEMFAULT_NCS_POST_COREDUMP_RETRY_INTERVAL_SECONDS.
config MEMFAULT_NCS_POST_COREDUMP_RETRIES_MAX
int "Max number of coredump post retries"
default 3
default 4 if MEMFAULT_NCS_POST_COREDUMP_AFTER_INITIAL_WAIT
help
Maximum number of retries to post a coredump to Memfault.

Expand Down
4 changes: 4 additions & 0 deletions modules/memfault-firmware-sdk/memfault_lte_coredump.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,11 @@ static const struct smf_state states[] = {
state_network_connected_run,
NULL,
&states[STATE_RUNNING],
#if defined(CONFIG_MEMFAULT_NCS_POST_COREDUMP_AFTER_INITIAL_DELAY)
&states[STATE_COREDUMP_SEND_BACKOFF]),
#else
&states[STATE_COREDUMP_SEND_ATTEMPT]),
#endif /* CONFIG_MEMFAULT_NCS_POST_COREDUMP_AFTER_INITIAL_DELAY */
[STATE_COREDUMP_SEND_ATTEMPT] =
SMF_CREATE_STATE(state_coredump_send_attempt_entry,
state_coredump_send_attempt_run,
Expand Down

0 comments on commit 52ab5ff

Please sign in to comment.