Synchronize a flash memory