This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello!
I wrote a piece of code to write data into FRAM. I tested the code with 5969 Launchpad and our custom boards. Everything is working fine at my workplace. But if I flash the same code at home on my Launchpad using MacBook, I can't get the code working. However, the FRAM example in Driver Library is working though
/* * FRAM.c * * Created on: Feb 11, 2016 * Author: Teja Chintalapati * Contact: teja.chintalapati@gmail.com * Phone: +91-8792-355-512 * Description: Contains code to read and write into FRAM * */ /****************************************************************************** * INCLUDES */ #include "FRAM.h" /****************************************************************************** * DEFINITIONS */ //To know till what address FRAM is filled #define FRAM_FILL_LOCATION 0xBABA /****************************************************************************** * FUNCTION DEFINITION */ void FRAMWriteString(uint8_t *writeAddress, char *writeData) { uint16_t *ptr; while(*writeData != '\0') { *(writeAddress++) = *writeData++; //Incrementing the address till which FRAM is filled ptr = (uint16_t *)FRAM_FILL_LOCATION; *ptr = *ptr + 1; } } void FRAMReadString(uint8_t *readAddress, char *readData, uint16_t dataLength) { while(dataLength-- > 0) *readData++ = (*readAddress++); } void FRAMClearData(uint8_t *endAddress, uint8_t *startAddress) { uint16_t *ptr; while(endAddress - startAddress + 1) { *(startAddress++) = 0xFF; //Decrementing the address till which FRAM is written ptr = (uint16_t *)FRAM_FILL_LOCATION; *ptr = *ptr - 1; } //We've deleted one extra location. So, add 1 *ptr = *ptr + 1; } void FRAMClearAll(void) { FRAMClearData((uint8_t *) 0xFFE0, (uint8_t *)0xC000); *lastFilledFRAMLocation = START_ADDRESS; }
Additional Info: At workplace, I used FET to flash the code. OS: Windows 8 and CCS6.1.2
At Home: Flashed Launchpad using USB. OS: OSX El Capitan, CCS: CCS Mac Beta.
Please help me understand why the same code is working differently in different platforms.
Thanks
Teja
**Attention** This is a public forum