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

How to write a text file to external onboard memory of 64Mb on nrf52840 PDK?

Hi Everyone 

I am able to write and read to and from QSPI memory interfaced with nrf52840 PDK.

I am using Segger Embedded Studio with sdk15.0.

I want to create a text file and store the text file inside the external memory.

Does segger allow File creation and writing ?

If yes, How can i achieve the requirements?

Thanks 

Rajat!

Parents Reply
  • The minimum possible write is 4096 bytes , less than that not possible
    So in order to write the DHT11 data , you'll have to restart from the zero address when the address reaches its maximum value
    You can create a structure which will contain the dht11 data and start writiing the sensor data in that structure and after every reading , write the structure to the memory and increment the address by 4096 bytes. If you don't increment by 4096 bytes , the previous data will be erased

    1. Read sensor
    2. Store in structure
    2. Write to QSPI(Adddress = 0)
    3. Address = 4096 + address

Children
Related