Dear All,
I have been checking each and every question related to this problem including the user's guide, but I haven't been able to write to and read from FRAM in MSP430FR5969. If useful, I am not using TI CCS or IAR but msp430gcc.
The (rather simple) code I am trying to run is as follows:
#define FRAM_START_ADDR 0xD000 #define FRAM_END_ADDR 0xE000 unsigned long *FRAM_write_ptr; unsigned long data; /*---------------------------------------------------------------------------*/ void fram_write(void) { data = 0x00000001; FRAM_write_ptr = (unsigned long *)FRAM_START_ADDR; PRINTF("Writing to 0x%" PRIXPTR "\n", (uintptr_t)FRAM_write_ptr); *FRAM_write_ptr = data; PRINTF("Data %lu VS FRAM_write_ptr %lX \n", data, FRAM_write_ptr); } /*---------------------------------------------------------------------------*/ void fram_read(void) { FRAM_write_ptr = (unsigned long *)FRAM_START_ADDR; PRINTF("Reading from 0x%" PRIXPTR "\n", (uintptr_t)FRAM_write_ptr); data = *FRAM_write_ptr; PRINTF("FRAM_write_ptr %lX\n", data); } /*---------------------------------------------------------------------------*/
And the output I get is:
Writing to 0xD000 Data 1 VS FRAM_write_ptr FFFFFFFF Reading from 0xD000 Data_write_ptr FFFFFFFF ...
Any help would be highly appreciated. Many thanks
Best wishes,
David