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: Dealing with ULP warnings 5.2 and 13.1 - Detected floating point operations and detected loop counting up

Part Number: MSP430FR5994


I am executing a code on the MSP430 to run a neural network. To generate the inputs to the network, I need to calculate FFT coefficients of the sound signal captured by an external microphone interfaced with the MSP430. While the code executes and I get the outputs I am looking for, I am trying to optimize the application further for harnessing the ULP capabilities of the device. Once built, I see some advices from the ULP Advisor regarding the floating point and for loop operations in my code. While I have dealt with these advices where they point to my code - the warnings still show up for many other files which are not actually being used by me but are a part of the project since they are in the Include path/options of the project. For example, I use the DSPLibrary for FFT calculations but here, I am not using the matrix functions and yet I see the following warnings since I have "DSPLib/include" as a part of my include options - 

Additionally, while I use the driver library for interfacing some buttons and interrupts, I also get ULP warnings for the files which I am not using like the 'aes256.c' or 'cs.c' as follows:

I have two main questions here: Firstly, how much of a difference would removing these warnings actually make in terms of the power consumption of my code? Secondly, if it is indeed significant, what could be a remedy to avoid this? Is it possible to somehow partially include only the required files while discarding the unused ones? I have tried removing some files from these folders which were unused but showed warnings and have also tried to selectively include files in the include options - but in both these cases - the project did not build due to missing files (the same files that I had removed). Please let me know if any more information is needed. 

After some analysis, I am leaning towards not using the LEA and in such a scenario, if there is any other way to further optimize power consumption, I definitely want to try and achieve the same. Thank you. 

  • Hello Siddhant,

    Its important to keep in mind that the ULP advisor was made to give advice on device settings and coding practices the lowest power possible. Its advice or warnings can run counter to the objectives of an application as it doesn't know what you are trying to do, just how you are doing it. For example, counting down in loops is more efficient in MSP430 due to the nature of its core (less cycles), thus that warning/advice to try to have loops count down versus up. Floating point is very taxing on MSP430 CPUs (and other MCUs that don't have Floating Point Units integrated) as it takes quite a bit more cycles for basic math with that number format versus others. 

    All that is to say, for your application, you could probably ignore these warnings from ULP as they just don't apply when using the DSPLib. I will say, with the calculations you are trying to perform, LEA will be your lowest energy option as it will be able to crunch through FFTs faster (less cycles) than just using the MSP430 core. Especially if you are trying to do many FFTs. 

    You can turn off specific warnings within ULP Advisor if you don't think they are applicable for your application. 

    To see the energy benefits of LEA, see the following collateral:

    Low-Energy Accelerator (LEA) Frequently Asked Questions (FAQ)

    https://www.ti.com/tool/TIDM-FILTERING-SIGNALPROCESSING (Has good comparison of LEA vs no-LEA  current consumption in Design Guide)

**Attention** This is a public forum