FLASH memory reading as a functions