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.

Using an unsigned long long pointer to access and pre-load the MSP430F47xxx 64-bit hardware multiplier result registers

 

 

 

The MSP430F47xxx  has 4 16-bit hardware multiplier result registers named RES0 to RES3. I have been tring to access these using a pre-defined pointer to make my code more readable. I have tried to use the construct:

unsigned

 

long long * const pHwMultResult = (unsigned long long*) & RES0;  // A pointer to the (low) result register type cast to 64-bits

However I cannot access the registers values or assign them using the pointer I created even though I do see that the pointer points to the right spot (and some values are there). Looking at *(pHwMultiResult) in the variable display always shows 0 even though there are some values in RES0 - RES 3.

Statements such as:

gRawRecDose.

SumSq = *pHwMultResult; // Return Result to the global accumulating variable

Do not work. In addition I have noticed that structure members with unsigned long long or long long types cannot be assigned values in my code. I do not know why this is.

-B

  • Bradford Backus said:
    Looking at *(pHwMultiResult) in the variable display always shows 0 even though there are some values in RES0 - RES 3.

    This looks related to your other forum thread. As I mentioned in that thread, there is an issue with displaying long long variables in CCS expressions/variables view, however the code should execute as expected and the values should also be as expected in the memory view.

    Please let us know if this is different than what you are observing.