Yes, when I transfer 65536 (64K) of data, it works fine. the result is as followed for 64KB: (the last 3 results)
--- Quote Start ---
Value at 140FFF4 is 16381, written is 16381
Value at 140FFF8 is 16382, written is 16382
Value at 140FFFC is 16383, written is 16383
--- Quote End ---
my flash base is 0x1400000. the last data was written into 0x140FFFC as shown above.
now i set the size to be 131072 (128K). the output is:
--- Quote Start ---
Error writing into flash: -5
--- Quote End ---
--- Quote Start ---
So, I understand that now the first 64kb write at offset=0 is ok while the second write at offset=0x10000 fails. Is this right?
--- Quote End ---
Yes, at second write at offset 0x10000 fails.