Hi. I have a XC167CI-32 project with external flash - AM29F800BB. The programming algorithm is from the file m29f800a.c . I am using XARRAY to write and read to flash adresses.
#define ExtFLASH XARRAY (int, 0x400000)
example: ExtFLASH[0x5555L] = 0x00AA; //write to flash
iRetVal = ExtFLASH[0x0001L]; //read from flash
Everything is working ok if the offsetadress eg array index is smaller than FFFF. If it is 10000 adress 0x0000 will be written instead of 0x10000 and the write process will fail.
How can i solve this problem? I have tried a lot of things like using XVAR(int,offsetadress)=data but nothing except for XARRAY will work.
/Christian