Hi... i am getting the data through the RX,TX which is externally connected to the nRF52832 development kit , now i want to store the continous incoming data to the variable , how to do that ?
Hi... i am getting the data through the RX,TX which is externally connected to the nRF52832 development kit , now i want to store the continous incoming data to the variable , how to do that ?
Hi
Please check out the fstorage or Flash Data Storage examples which shows how you can store incoming data in your device's flash memory.
The difference between the two is that fstorage is more "down to metal", where you need to decide to what address you want to write the data. Remember that you need to delete an entire flash page before you can write to the same address once more. FDS will handle this for you, and always write to a free address. It operates with records that you can write, update and delete.
Try to read a bit about each of them. The advantage is that this will make sure of an even flash wear distribution, which will make your flash last longer. The disadvantage is that it has more overhead per record, so you may need to consider to gather up data for e.g. one minute, and save it all in one record.
Best regards,
Simon
sorry i don't want to store , just i need to assign variable to the that
similar to this data_array[index]=str[index]
Hi
Then you should write the data to flash when the buffer fills up using app_uart_get, and tell the other end when the buffer is cleared and the nRF is ready to receive again. You can also check out this case, which shows how you can use memcpy() to store data in a variable.
Best regards,
Simon