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.

MSP430FR50431: MSP430FR50431 - using .xml file VFR calibration on msp

Part Number: MSP430FR50431

Hi !

software-dl.ti.com/.../ch_calibration.html

I use it to perform VFR calibration.

I would like to know if after I export an xml file from the calibration, I can burn it to the MSP and tell it to use this file in order to have appropriate water flow values?

This is what I do today, I prepared a calibration file and I load it through the USS and then on the "Waveforms" page I click on using an adv table.

I would also like to be detailed if it is possible on our custom board to burn this file on the MSP, and how to do it if so? where can i find the registers and the command specific?

Attached is a picture for the description.

  • Hi Ido,

    Your calibration information should all be located inside the .h files that are generated when you click generate headers. I think that the .xml file just saves the measurement data. When you have the .h files from generating the headers, you will be able to add them to your project to then program to your device as you would have done with your previous project files.

  • Okay I understand .
    But in USS GUI there is a button for adv.calibration table
    which causes the calibration values ​​I claimed to be used.
    If the button is not used then the flow values ​​are not the same as the calibration values ​​I did.

    I did as you said, I took the .h files of the headers I made and burned them in the project through the CCS, but still the flow values ​​do not change until I use this button
    Is there another way to tell to use this calibration table?

    Is there a way to set it to use a calibration table by default in the "USS_userconfig.h?

  • My expectation is that when you check that box for advanced calibration, then generate the headers, the headers will include the information that you've entered into the calibration table. When you generate these headers, can you confirm that you are placing all 3 headers (USS_intrplCorrLUT.h, USS_meterCFRCalibFlow.h, and USS_userConfig.h) into the USS_Config folder in your project before recompiling it? I believe these are all the necessary steps.

  • No, unfortunately it doesn't work.
    I export the files as you mentioned, transfer them to a file that I burn to MSP, then I try to see the water readings and they are not updated for the calibration I did.
    Only after I mark it to use a calibration table does it change the values.

    Maybe there is a button or method in the code that allows you to use this table?

  • I see okay,

    Are you performing manual or run-time configuration?

    Have you tried flashing the device with the new header files, then using the Read MCU Configuration feature to check to see if the GUI populates with the correct calibration data? This would show you whether the correct values are being programmed to the device.

  • Yes, I tried it and it really shows me the values correct calibration data.
    But when I get to flow values if I don't check the adv.cal table then I get lower values than my calibration.
    Even in the csv file I export the flow values are lower than my calibration until I check the button

    Again, as I told you, it seems that there is a button that allows flow values to use this table, do you know something like that?
    Because in the end I want to load this calibration table and directly read correct values.

  • I think I misunderstood the issue: You just need to enable the usage of the table in the code, rather than checking the Adv calibration table box, is that correct?

    You should be able to do this by using the header files like before, and manually setting USS_ENABLE_VFR_METER_CALIB to true in your code.

    This can be found in the USS Design center users guide.

  • Yes, I saw it in the link you sent.
    But this is a parameter that is not found in the demo code for some reason!

    And not only him.. there are some parameters there that are not found..
    I did not find these in the entire code.

  • I see what you are saying in the code... 

    I do see the two other defines in the code, USS_MEASUREMENT_TURN_ON_EXTERNAL_AMP_SEC and USS_ALG_VOLUME_RATE_COMPUTATION_MODE. 

    I am going to check with my team to see if this was removed for some reason and is not updated in our documentation. Please allow me 2 days time to get a response and relay it to you.

  • Hi Ido,

    After consulting my colleague, it looks like you need to call USS_runAlgorithms() instead of USS_runAlgorithmsFixedPoint() in order to get calibrated VFR results. Alternatively, you could call USS_runAlgorithms() as this calls USS_calibrateVolumeFlowRate().

    So replace that function call and let me know if that helps you get the correct data out of the device.

  • I don't come from this world, so I'll ask more specifically.

    You mean if I change it to USS_calibrateVolumeFlowRate it will activate the adv calibration table?

    Am I in the right place that needs a change?

  • I mixed the function calls in my previous response, sorry about that.

    You should call USS_runAlgorithms() instead of USS_runAlgorithmsFixedPoint(). This function calls USS_runAlgorithmsFixedPoint(), then it calls USS_calibrateVolumeFlowRate(), which adjusts the results from USS_runAlgorithmsFixedPoint using the advanced calibration table.

    So replace the function that you've highlighted in the screenshot with USS_runAlgorithms() and you should get the updated VFR results.

  • still not going well ..

  • USS_runAlgorithms takes arguments of type USS_SW_Library_configuration and USS_Algorithms_Results. USS_runAlgorithmsFixedPoint takes arguments of type USS_SW_Library_configuration and USS_Algorithms_Results_fixed_point.

    When you change the function from USS_runAlgorithmsFixedPoint() to USS_runAlgorithms(), you also need to ensure that the arguments are of the correct type. The first argument (&gUssSWConfig) can remain the same. &algResFixed must be changed because it is the incorrect type. 

    I believe we define algResults for you in the project, which is of the correct type. Replace &algResFixed with &algResults and the warning should go away. If this is not already defined, you can add the definition:

    USS_Algorithms_Results algResults;

    To the top of the void USSLibGUIApp_Engine(void) function in the USSLibGUIApp.c file inside of your USS_Water_Demo project.

  • Thanks !

    when i do that and burn on the MSP, i get my flow volume stuck in some value :

    do you know what can be the reason ?

  • Interesting. Can you post an image of what your ToF and VFR windows looked like when you enabled the advanced calibration table in the GUI like before?

    Additionally, you only changed the one line to use the new function with the new struct? I would not expect that change to result in your results suddenly not working. Perhaps when the data is transmitted to the bridge, it is still expecting fixed point results with iqmath formatting, as shown in USS_Algorithms_Results_fixed_point. Could you debug the project to check the values of the struct in the debug/watch window to see if they are closer to your expected values?

  • Hi !

    I'm back from exam period !

    This is the image when i enable the adv.cal.table.

    Yes, I just changed this variable like you said and burned and that's what happened..


    And regarding what you said to do, I didn't quite understand,
    If you could explain a little more in detail?

  • Thanks for the image Ido.

    To explain in more detail, I mean that you should try debugging the code in CCS (or whichever IDE you prefer), and check the values of the VFR and ToF values in a variable watch window. Check to see if these values are close to your expected VFR and ToF values. I suggest this because I think the GUI may expect this data to be in fixed point format, whereas your project is no longer sending it in this format. Checking the VFR and ToF values in the debugger watch window will allow you to view the value as a float, or in hexadecimal, so then you will be able to verify if the data is actually wrong now or if the format is just causing the issue.

**Attention** This is a public forum