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.

EVM430-FR6047: About lobe maximum

Part Number: EVM430-FR6047
Other Parts Discussed in Thread: TIDM-02005

Dear person in charge

I have a question on "TIDM-02005_Design Guide Optimized Ultrasonic Sensing Metrology Reference".


In the process of calculating absoluteTOF, it is stated that the "loce maximum" is calculated.
Is there any way to check this "lobe maximum"?



I would like to obtain the value actually calculated in the MCU.

  • Hi Masaki-san,

    See the USS FAQ document, section 1.3 (page 10).

  • Hi Dennis

    Thank you for your answer.

    Please let me confirm one thing.

    In section 1.3 of the FAQ, is "the maximum amplitude of the received ADC" the value of the red dot in the figure below correct?
    Or is it the maximum value obtained by ADCCapture? (the maximum value of the blue circle in the figure below)

    What I want to get is the peak of Lobe. (red dot)
    Please let me confirm that I have the correct recognition just in case.

  • Hi Masaki-san,

    The red dots are computed.  You will need to follow the instructions in the FAQ and find the peak ADC measurements that are stored in the buffer "USS_HAL_LEA_DATA".  Here is the declaration for this memory buffer allocation from USS_userConfig.h.

    // LEA and FRAM memory buffers
    USS_HAL_LEA_DATA(gUSSLEATempMemBlock, 4)
    __no_init int16_t gUSSLEATempMemBlock[2 * (USS_SW_LIB_APP_MAX_CAPTURE_SIZE +
                                USS_SW_LIB_APP_MAX_FILTER_LENGTH)];

    For convenience, I have copied here for others to see.

    How can my software get the maximum amplitude of the received ADC waveforms? In the function USS_startUltrasonicMeasurement() or USS_startLowPowerUltrasonicCapture() in USSLibGUIApp.c, add a function to search for the maximum and minimum of the captured downstream and upstream signals. The captured waveforms are stored at gUssSWConfig.captureConfig.pCapturesBuffer. The memory buffer has the structure sampleSize × numberOfAcquisitions × 2, as in the documentation for the USS software Library. numberOfAcquisitions is usually 2 or 1 for upstream and 1 for downstream.

  • Hi Dennis-san

    Thank you very much for your response.
    It was very helpful.

    May I continue with one more question?

    Could you please tell me where the flow calculation program is written in USS_Water_Demo?

    Also, is it possible to generate a pseudo flow rate by adding or subtracting a certain value to the obtained ΔT and absoluteTOF?

  • Hi Masaki-san,

    The flow calculations are performed in portion of the library code that is in binary form, so no source code is provided.

    The function is "USS_runAlgorithmsFixedPoint.  I have included a snippet from the ussSWLib.h file that contains a description of its operation.

    The best document that describes how to customize the library is found in section 3.3 "Customizing Data Processing" of the Application Software Architecture for MSP430FR6047 USS Water Flow Meters, slau732a.  There you will find information about obtaining data from the ADC capture and functions to use for custom flow calculations.

    Regarding adding or subtracting values from absTOF of dTOF to generate a pseudo flow, yes.  Can you explain why you want to do this?  I may be able  to provide a better answer if I know what you are attempting to do.

  • Hi Dennis-san

    Thank you very much for your response.

    When conducting electrical tests, etc., it is difficult to flow the actual flow rate, so we would like to generate a pseudo flow rate on the software side with water stored in the piping.

    I was thinking of editing the calculation formula, but if it is too difficult, I am considering changing the "DeltaTOF Offset" value.
    Is there an upper limit to the "DeltaTOF Offset"?

    Or if there is a better way please let me know.

  • Hello Masaki-san,

    If I understand you correctly, you will use a tube filled with water, but not flowing (0 flow) and manipulate the .dcOffset value to simulate a flow based on the value you use, correct?  It appears the default value is located in file USS_userConfig.h

    It is used in a struct as shown below in USS_userConfig.c.  You can try, but I have never done this so I cannot guarantee it will work.

    Regarding the range, I did not find any upper limit.  Min value is 0 of course.

    Let me know if this works for you.

  • Hello Masaki-san,

    Checking to see if the above suggestion worked for you.

    It's been a while since we have heard from you, so I'm going to assume you were able to move forward with your project.
    I will mark this posting as RESOLVED, but if this isn’t the case, please click the "This did NOT resolve my issue" button and reply to this thread with more information. If this thread is locked, please click the "Ask a related question" button, and in the new thread describe the current status of your issue and any additional details you may have to assist us in helping to solve your issues.

**Attention** This is a public forum