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.

MSP430FR5994: (ULP 5.2) Detected floating point operation(s). Recommend moving them to RAM during run time or not using as these are processing/power intensive

Part Number: MSP430FR5994


I am using a two function implementation to calculate Mel-frequency coefficients for a neural network. My code is executing in it's entirety without any issues. However, after using the Energy Trace technology to estimate the average energy needed - I observed that much of the time required is for calculating these coefficients as they use floating point operations. A warning issued by the compiler is the ULP 5.2 as mentioned in the title. While I found some similar questions dealing with the warning, I have not found an answer that addresses the possible solution or method of moving operations to the RAM during runtime. I cannot change or let go of the floating point as it is integral to the correctness of the calculation. How can I implement the solution for this advice/warning issued by the MSP. I tried making some changes to the linker file namely moving my variables and pragma declaration on the FRAM and also assigning the '.run' as 'FRAM2' in the following section of the file:

#ifdef __TI_COMPILER_VERSION__
#if __TI_COMPILER_VERSION__ >= 15009000
#ifndef __LARGE_CODE_MODEL__
.TI.ramfunc : {} load=FRAM, run=FRAM2, table(BINIT)
#else
.TI.ramfunc : {} load=FRAM | FRAM2, run=FRAM2, table(BINIT)
#endif
#endif
#endif

However, I am still not certain where and what exact changes can be made to the code in order to improve the power consumption while using float operations in the MSP430. Please let me know if any additional information is required. Thank you.

  • Hi,

    IQMATH could speed up the calculation and optimize the consumption.

    www.ti.com/.../MSP-IQMATHLIB

  • IQ math would mean converting my values into a fixed point representation which I want to avoid - I specifically wanted to check if there is anything that can be done about the warning - Recommend moving to RAM during runtime

  • Hi

    You can put the function to RAM by modify the .cmd file

    You can refer to this example:

    // define your function like this:

    _Pragma(#CODE_SECTION(your_function, “.ramfunc”))

    Void your_function(void)

    {

    ;

    }

    // Add a statement in cmd file 

    SECTIONS

    {

    ….

    .ramfunc : {} load=FRAM, run=RAM  // that means load the function from FRAM to RAM and run in RAM,

     

    …..

    }

  • Looking at the device data sheet the advantage depends on the FRAM cache hit ratio. For typical hit ratios (a cache line is 4 words so sequential code will be 75%) executing from RAM takes about half the power. This may not be worth the effort.

    The floating point library takes up a lot of space so not many devices would be able to hold it. In any case, telling the linker to put library code in RAM could be tricky at best. So you would want to select only those portions of code that get the most use.

    The energy used by many low power applications depends on the duty cycle. If it spends 99% of its time in a low power mode the active mode current doesn't matter much.

  • Thanks for the detailed response David, this is really helpful - I wasn't sure how much of a difference it would make by moving these functions anyway but I think I can now decide better what steps I can take to possibly optimize the code.

**Attention** This is a public forum