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.

Is there any risk to write in Info segment of Flash MSP at cold temperature (0 to -40°C)

Other Parts Discussed in Thread: MSP430F5342, MSP430WARE

Hi all,

I encounter problem, writing in flash info memory segment of my MSP430F5342. It actually lost all the data within (all 0xFF). I write something in every 10 minutes and I erase the segment and then write it back.

It seems to be linked with temeprature. Is there any restriction?

Thanks a lot,

  • Hi,
    What is the full device name? Check the part number decoder in the datasheet (http://www.ti.com/lit/ds/symlink/msp430f5342.pdf). Depending on the part you have it may only operate down to 0C.

    Damian
  • Thank you for reply,

    My MSP is MSP430F5342IRGZT.

    So it should be -40°C to 85°C compliant.

    Thank you again,

  • Sebastien,
    The FLASH technology for the information memory segments is the same as for the main FLASH of the device. Given that only the INFO blocks are being affected, I am inclined to think that this is being caused by code execution. Can you provide a step-by-step description of code execution including the INFO memory segment that is having problems and the way you are seeing the issue? If you feel comfortable posting the code here, I can give it a look.

    Damian
  • Damian Szmulewicz said:
    Given that only the INFO blocks are being affected

    If he is only writing to the INFO section, then it stands to reason that only the INFO section would be affected.

    The device being used is rated for I temperature range (-40 to +85 C), and those devices should meet all specifications within that range. So it is fair to assume that the temperature-dependency of the issue is not due to the silicon itself.

    That leaves specifics of the code or other parts of the system. Could the frequency vs vcore settings be incorrect? Is the input voltage to the MSP stable over temperature? A full register dump and the programming sequence code would provide insight into the problem.

  • Hi all,

    First, thank you for your reply. Here are the bit of code I use to write to the flash Segment, it is quite the same than the example provided in MSP430ware:

    if (dataLength + startIndex <= SECTION_SIZE) {
    		__disable_interrupt();
    
    		if (readInternalFlash(intFlashSection, tempArray, SECTION_SIZE, 0,
    		FALSE)) {
    			flashPointer = getPointerOnSection(intFlashSection);
    			//Write in tempArray
    			for (i = 0; i < dataLength; i++) {
    				tempArray[i + startIndex] = writeData[i];
    			}
    			//Write tempArray
    			FCTL3 = FWKEY;                            // Clear Lock bit
    			FCTL1 = FWKEY + ERASE;                      // Set Erase bit
    			*flashPointer = 0;               // Dummy write to erase Flash seg D
    			while (FCTL3 & BUSY == BUSY)
    				;
    			FCTL1 = FWKEY + WRT;              // Set WRT bit for write operation
    			for (i = 0; i < SECTION_SIZE; i++) {
    				*flashPointer++ = tempArray[i];          // Write value to flash
    				while (FCTL3 & WAIT == WAIT)
    					;
    			}
    			FCTL1 = FWKEY;                            // Clear WRT bit
    			FCTL3 = FWKEY + LOCK;                       // Set LOCK bit
    		}
    
    		if (enableInterruptBack) {
    			__enable_interrupt();
    		}
    		result = TRUE;
    	}

    I ran a test over the week end (so more than 48hours) with 5 module in the freezer (between -23 and -30 °C), and running on an external power supply: the problem did not show up.

    Hence, it is pointing toward the battery, as I observed the problem when modules were on battery. This battery is a small primary battery, supposed to go down to -40°C. I measured the cut off voltage of the system to 2.2V, to have a stable 2.0V on the MSP side. I made some test and the battery does not drop below 2.6V, at midcharge at -40°C. So I assumed it can't be a problem.

    Then I read on the datasheet that erasing and writing to the flash draws 11mA. (+the quiescent MSP current I guess). It starts to get quite high to the battery, as my test on the cutoff voltage was for a 13mA pulse.  Could the reason be something like: we start to erase the flahs, the current drawn makes the voltage drop below the cutoff voltage and reboot the MSP. As a result, the flash has been erased but nothing has been written, and the MSP reboots with no data...?

    I am running a new test with 2 of the 5 modules programmed with a firmware that does not write into flash below 0°C. I put them into the freezer and on battery. So far (5 hours) all TCube are working well. I will let them running for 1.5 week and see how it goes after that.

    If I am in bad luck, this problem may just occur at -40°C and I won't see anything, untill I test them again on thermal chamber.

    Thank you for your replies and merry christmas !

  • Hi Sebastien, 

    I wanted to check on you for any new findings/issues. The higher current drawn by the device when erasing/writing to FLASH could cause enough stress on the battery at low temp where you can observe a voltage dip. A voltage level below the MCLK requirement will cause a reset and if this reset occurs before FLASH is written, then you will end up with all 0xFF in the FLASH segment. If you have an LED or some kind of serial interface to the board, then you can have a startup way (blink LED or send UART data) to determine if a reset has occurred. The fact that it has not failed with the power supply suggest that the battery is the problem as you stated. If you have any new findings or you need help please let me know. 

    Thanks, 

    Damian

**Attention** This is a public forum