I want to use fstorage to write data to a file. The File with three records: 0x1111="Tablet1", 0x2222="data: abcdef", 0x3333="26". How to implement it? Can anyone guide me?
I want to use fstorage to write data to a file. The File with three records: 0x1111="Tablet1", 0x2222="data: abcdef", 0x3333="26". How to implement it? Can anyone guide me?
Hi
There is fstorage example code available here for SDK 10. There is also available simple fds code here for SDK 11. Discussion on the difference between pstorage, fstorage and fds is briefly discussed here
Update 26.10.2016 Below is fstorage example for SDK 11.0.0. The example writes two words to flash and then reads the flash contents. Result is printed on UART (UART settings: 115200 BAUD, 8N1, hardware flow control disabled)
ble_app_template_with_fstorage_operations.zip
Update 2 26.10.2016 I attach another SDK 11.0.0 example with the following UART output
ble_app_template_with_fstorage_operations_ascii.zip
Hi
There is fstorage example code available here for SDK 10. There is also available simple fds code here for SDK 11. Discussion on the difference between pstorage, fstorage and fds is briefly discussed here
Update 26.10.2016 Below is fstorage example for SDK 11.0.0. The example writes two words to flash and then reads the flash contents. Result is printed on UART (UART settings: 115200 BAUD, 8N1, hardware flow control disabled)
ble_app_template_with_fstorage_operations.zip
Update 2 26.10.2016 I attach another SDK 11.0.0 example with the following UART output
ble_app_template_with_fstorage_operations_ascii.zip
Write hexadecimal code semms successfully. But write ASCII string include specail characters will cause fail. Can you test it with special characters like "~!@#$%^&*()_+-="?
System seems halt when I call the function of fds_record_write from BLE ancs profile. Can I not access fstorage from BLE ancs profile? Is it correct? Do you know how to do it?
i have compile your code but it only show at segger rtt only the start and erasing a flash page at adresss0x7900 .neither writing nor reading the data