I want to read the data from the 0x00100000 address and write to the 0x00100020.
Data to flash cannot be simply written. It needs to be programmed to the erased area (smallest unit is sector size of 2 KB).
If you need to write small data on the regular basis, I would recommend to use EEPROM emulation driver.