How I can read and write data to flash memory?