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.

Writing a 32 bit variable to information memory

Other Parts Discussed in Thread: MSP430F5437A

I am using Code Composer Studio Version: 4.2.5.00005.  I am developing on the MSP430F5437A.

Previously, I was using Code Generation Tools v3.3.3.  While using this version of the compiler, I was able to set a 32 bit variable to 0 information memory with just one write. See below, with reserved2 being defined as a uint32_t:

gladiatorInfo.p_deviceInfo->reserved2 = 0;

However, I recently updated the Code Generation Tools to v4.1.6.  Under this version, I am no longer able to set a 32 bit to 0 in information memory with just one write.  Instead, it sets the lowest 16 bits of that 32 bit variable to 0, but not the entire thing.

Is there a compiler option I can set that will allow me to maintain the ability I had in v3.3.3?  I'd rather not go back through and change all of my writes to multiple 16 bit writes if I can help it.
Any info would be much appreciated, thanks! 

 

  • In the toy test cases I put together, I see a single instruction writing zero to the 32-bit memory location.  That says the compiler still generates that instruction.  It says nothing about why you are not seeing it in your case.

    Please tell us the version of the compiler (not CCS) you are using.  And give us a test case which compiles (but does not need to link) and lets generate the same assembly output you are seeing.  Preprocessing like this is usually helpful.

    Thanks and regards,

    -George

  • Thanks for the help George.

    I think I may have discovered the problem.  When writing to an information memory segment, I was setting the FCTL1 to this:
    FCTL1 = FWKEY+WRT;

    I found in the documentation that to write a 32-bit word, I would need to set that same register to this instead:
    FCTL1 = FWKEY+BLKWRT;

    After doing that, I was able to sufficiently write the data I need.  I do have a few clarifying questions, though.  I was under the impression that the Code Generation Tools version that I provided was indeed the compiler version.  I had stated in my original question that I upgraded from version 3.3.3 to 4.1.6.  If that is not the compiler version, could you please let me know what that is and how I can find the actual compiler version?

    Thanks!

     

  • Robert Lane said:
    I had stated in my original question that I upgraded from version 3.3.3 to 4.1.6.

    Indeed you did!  This is entirely my mistake.  I somehow mistook those for CCS version numbers.  Please accept my apologies.

    Thanks and regards,

    -George