Should there be a problem to read data directly from the flash in CC1110?
I wrote a function that writes data to the flash and it works fine(I see the memory with the debugger).
Now I want to read it in order to verify it so I wrote a very simple checksum function.
I wrote a whole page (page 31) with 0x1 and then ran this code.For some reason it returns junk and not 1024 which it should.
ChkSum(0x7C00,1024)
UINT16 ChkSum(UINT16 address,UINT16 NumOfBytes)
{
UINT16 i,checksum=0;
UINT8* FlashPtr=(UINT8*) address;
for (i=0;i<NumOfBytes;i++)
checksum+=(UINT16) FlashPtr[i];
return checksum;
}
any idea?
thanks