Skip to content
This repository has been archived by the owner on Oct 14, 2022. It is now read-only.

quick and dirty sample nrf-connect app for the nrf52840

Notifications You must be signed in to change notification settings

memfault/nrf-connect-nrf52840

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

ARCHIVED

NOTE: this repo is no longer maintained- it has been migrated to the Memfault Firmware SDK Examples folder here:

https://github.com/memfault/memfault-firmware-sdk/tree/master/examples/nrf-connect-sdk/nrf5


nRF-Connect nrf52840 Memfault Example

This is a small example application showing a Memfault integration running on an nrf52840 development board, using the nrf-connect SDK.

Usage

Make sure you have the Zephyr / nRF-Connect tools installed first:

https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/nrf/gs_installing.html

To build and flash this example to an nRF52840-DK (PCA10056), run the following commands:

❯ west init -l memfault_demo_app
❯ west update
❯ west build -b nrf52840dk_nrf52840 memfault_demo_app
❯ west flash

Open a serial terminal to access the console:

# for example, pypserial-miniterm
❯ pyserial-miniterm --raw /dev/ttyACM0 115200

The console has several Memfault test commands available:

uart:~$ mflt help
mflt - Memfault Test Commands
Subcommands:
  reboot              :trigger a reboot and record it using memfault
  get_core            :gets the core
  clear_core          :clear the core
  crash               :trigger a crash
  test_log            :Writes test logs to log buffer
  trigger_logs        :Trigger capture of current log buffer contents
  hang                :trigger a hang to test watchdog functionality
  export              :dump chunks collected by Memfault SDK using
                       https://mflt.io/chunk-data-export
  trace               :Capture an example trace event
  get_device_info     :display device information
  post_chunks         :Post Memfault data to cloud
  trigger_heartbeat   :Trigger an immediate capture of all heartbeat metrics
  get_latest_release  :checks to see if new ota payload is available

For example, to test the coredump functionality:

  1. run mflt crash and wait for the board to reset

  2. run mflt get_core to confirm the coredump was saved

  3. run mflt export to print out the base-64 chunks:

    uart:~$ mflt export
    <inf> <mflt>: MC:SE4DpwIEAwEKbW5yZjUyX2V4YW1wbGUJZTAuMC4xBmFhC0Z5RE1gF8EEhgFpSW5mbyBsb2chAmxXYXJuaW5nIGxvZyEDakVycm9yIGxvZyE=:
    <inf> <mflt>: MC:gE6A/A==:
    
  4. upload the chunks to Memfault. see here for details: https://docs.memfault.com/docs/mcu/self-serve/#post-chunks-to-memfault

About

quick and dirty sample nrf-connect app for the nrf52840

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published