This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Writing/reading data to external flash on the nRF9160DK

Hello Nordic!

I have connected a sensor to the DK via SPI. It outputs a lot of data, a lot... for 1 second of data I get 4096 entries. Each entry is 10 bytes in length.


I want to store 20 seconds of sensor data on the flash memory, that is a total of about 0,8 MB if my calculations are correct.

The sensor has a FIFO-queue so if the write operation is quick enough there shouldn't be any data loss.
Once 20 seconds worth of data is recorded I then want to send this via LTE to server, I'm guessing in chunks.

Questions:
* How do I go about this? Is there a binary write example available?

* What size should the chunks be for this example?

* Once a file is written and done, before going in to the LTE-part of the design, is there any way to extract the bin file for data validation from the DK?


Thank you!

Parents
  • Hi Sebastiaan! Thank you for answering, truly appreciate it! I was to understand that the nRF9160DK has a 64 Mb external flash memory described here:
    https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_nrf91_dk%2FUG%2Fnrf91_DK%2Fexternal_memory.html

    This is indeed done via SPI.

    I'm thinking http communication but that is mostly because it's the one I know and have used, does it make much of a difference?

    That's a clever solution for getting the data, I will look into that solution.

    Many thanks!

  • I'm thinking http communication but that is mostly because it's the one I know and have used, does it make much of a difference?

    That's a very broad question :). Communication protocols are often fundamentally different with respect to speed, reliability, transfer size, security, ease of use, ...

    HTTP might be fine for now, you could extend it to HTTPS for improved security in the future. Coap might also be worth looking into, if your cloud platform supports it directly - I have unfortunately never used it yet since we typically interact with AWS which does not support coap.

Reply
  • I'm thinking http communication but that is mostly because it's the one I know and have used, does it make much of a difference?

    That's a very broad question :). Communication protocols are often fundamentally different with respect to speed, reliability, transfer size, security, ease of use, ...

    HTTP might be fine for now, you could extend it to HTTPS for improved security in the future. Coap might also be worth looking into, if your cloud platform supports it directly - I have unfortunately never used it yet since we typically interact with AWS which does not support coap.

Children
No Data
Related