Hi,
I have some problems configuring my FRAM, The FRAM is the model MB85R4002A
Is connected to the CS3, and I have configured the EMIF ASYNC2 the following:
The MPU is configured too as DEVICE
However I get funny things when writing into the FRAM:
I have an array in the FRAM, so I write a byte, I read the byte and I jump to the next byte, so I can check that the FRAM works correctly
for(int i =0; i< END_ADDR-START_ADDR; i ++) { image += 0x01; // pass the value of the FRAM and to the RAM mirror source[i] = image; mirror[i] = image; // Both should be identic for(int y = 0; y <= END_ADDR-START_ADDR; y++) { if (source[y] != mirror[y]) { while(1) { i=i; y=y; } } } }
Now, starting from the base address 0x64000000
-If I write in byte 0, the byte is copied in byte 0 and 2.
-If I write in byte 1, the byte is copied in byte 1 and 3.
-if I write in byte 2, the byte is copied in byte 0 and 2, byte 1 and 3 become 0.
-If I write in byte 3, the byte is copied in byte 1 and 3.
The same patter is reapeated over and over, and I can't find where is my mistake.
Could someone give me a hand?
Thanks,