Routine: dev.ti.com/.../node
Dear team:
My customer found after using routines to perform FRAM read and write tests:
After running the routine, use the emulator to reload it and find that the address content of the write operation is all 0.
He made the following modifications to the routine:
#define WRITE_SIZE 128 #pragma PERSISTENT(FRAM_write) unsigned char FRAM_write[WRITE_SIZE] = {0}; void FRAMWrite(unsigned char *buff,unsigned char len) { unsigned int i=0; for ( i= 0; i < len; i++) { FRAM_write[i] = buff[i]; } } void FRAMRead(unsigned char *buff,unsigned char len) { unsigned int i=0; for ( i= 0; i < len; i++) { buff[i]= FRAM_write[i] ; }
In addition, he would like to know whether the emulator can set certain areas of the fram not to be erased? And, how can I read and write FRAM at a specified address?
Best regards