We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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
Just had a thought. Is it possible that the index value of 0x10000 is being converted to short int inside the XARRAY macro? That would explain the problem.