Hi all,
My goal is to store large data which is approximately 300KB and send it using UART. To do it, I think I should the library of NVS on zephyr. I achieved to use it. But, creating and reading large data is my issue. My issues are the following:
1) How can I create 300KB data on flash using nvs or something?
2) How can I send these data through UART?
I found this example and I can use nvs like that:
/* ADDRESS_ID is used to store an address, lets see if we can
* read it from flash, since we don't know the size read the
* maximum possible
*/
rc = nvs_read(&fs, ADDRESS_ID, &buf, sizeof(buf));
if (rc > 0) { /* item was found, show it */
printk("Id: %d, Address: %s\n", ADDRESS_ID, buf);
} else {/* item was not found, add it */
strcpy(buf, "192.168.1.1");
printk("No address found, adding %s at id %d\n", buf,
ADDRESS_ID);
nvs_write(&fs, ADDRESS_ID, &buf, strlen(buf)+1);
}
Thanks for your interest.