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

Mesh SDK with flash storage

I have a few nRF52840 DK to evaluate a Bluetooth mesh application. The light switch example is ideal for our initial tests. The only thing I would like to do is to write some of the log to the flash storage on the board and read the file later via USB MSC. I don't always have access to the boards. I managed to modify the client example to switch the lights automatically and would now like to store the log to monitor if the messages arrived on the server. 

I found the usbd_msc example in the main SDK which I could use as a guide. How do I integrate the examples from the main SDK into the mesh SDK? Could someone please provide me with detailed instructions? I'm using CMake on Linux.

Thanks!

Parents Reply
  • For the time being I gave up on the USB problem and focused to get some storage into the light switch example. The fatfs example looks quite straight forward. When I compile the code I get the following error:

    nRF5_SDK_16.0.0_98a08e2/integration/nrfx/legacy/nrf_drv_spi.h:120:37: error: 'NRF_DRV_SPI_INSTANCE_0' undeclared here (not in a function); did you mean 'NRF_DRV_SPI_INSTANCE_'?
      120 | #define NRF_DRV_SPI_INSTANCE_(id)   NRF_DRV_SPI_INSTANCE_ ## id
          |                                     ^~~~~~~~~~~~~~~~~~~~~
    ../../nRF5_SDK_16.0.0_98a08e2/integration/nrfx/legacy/nrf_drv_spi.h:119:37: note: in expansion of macro 'NRF_DRV_SPI_INSTANCE_'
      119 | #define NRF_DRV_SPI_INSTANCE(id)    NRF_DRV_SPI_INSTANCE_(id)
          |                                     ^~~~~~~~~~~~~~~~~~~~~
    /media/storage/Nordic SDK/nRF5_SDK_16.0.0_98a08e2/components/libraries/sdcard/app_sdcard.c:148:36: note: in expansion of macro 'NRF_DRV_SPI_INSTANCE'
      148 | static const nrf_drv_spi_t m_spi = NRF_DRV_SPI_INSTANCE(APP_SDCARD_SPI_INSTANCE);  /**< SPI instance. */

    I understand that the APP_SDCARD_SPI_INSTANCE is defined in sdk_config.h and I could overwrite the default in app_config.h. I'm not sure what the issue in nrf_drv_spi.h is.

    Thanks!

Children
Related