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

Logging realtime sensor data to flash

I would like to know if it is possible to log realtime sensor data to flash while advertising. I would like to have a device which transmits real time ECG data over ble UART to an android device when in range and once out of range, should start logging the data to the nrf51822 flash. It should resume transferring the data to android device once it is in range again and connected. I would be glad if you could give me a clue as to how to realise this if it is possible.

Parents
  • Yes, that is certainly possible. You will have to decide on your approach as there are several ways to crack this nut. If you want to manage the flash yourself there are sd_flash_xxxxxx functions for writing, reading and erasing flash. If you want some abstraction and help managing the flash access you can use the pstorage utility and its API. I also believe there may be a higher level of abstraction through use of a device manager facility but I am not familiar with that.

  • Hi, please could you give a pstorage example code showing this? I need to write at least 20kb sensor data as the value changes, read and periodically send said values on instruction and then clear the flash on system off. Thank you, this would be very helpful as most of the code i've seen show storage of predefined data of small size( 10 blocks of 16 bytes of known value)

Reply
  • Hi, please could you give a pstorage example code showing this? I need to write at least 20kb sensor data as the value changes, read and periodically send said values on instruction and then clear the flash on system off. Thank you, this would be very helpful as most of the code i've seen show storage of predefined data of small size( 10 blocks of 16 bytes of known value)

Children
No Data
Related