Other Parts Discussed in Thread: TIDM-02005
Hello,
I've been running some performance tuning of our MSP430FR50431 based water flowmeter and I've discovered occasional issues with AbsTOF algorithm selecting wrong Lobe for time calculation.
After studying Design Guide TIDM-02005 I have a general understanding of the principle, but I still need to clarify a few details.
Question 1
Let's say that the ADC measures 5 lobes on the raising side with amplitudes 100,200,300,400 and 500 (maximum). I want the algorithm to lock onto the first lobe, so I configured USS_ALG_RATIO_OF_TRACK_LOBE = 0.2.
During standard operation the amplitude of all lobes will vary (although their mutual ratio should stay approximately the same).
If it is by 1% up or down, nothing will probably happen, but what if it attenuates for example by 50%? Therefore amplitudes would change to 50,100,150,200 and 250? Will the algorithm still lock onto the 1st lobe, or will it redo the search and lock onto the 2nd lobe? Is this recalculation condition connected to USS_ALG_MAX_RATIO_PEAK_2_PEAK_VAR parameter in any way?
I would also need further explanation of following parameters from USS_userConfig.h file:
USS_ALG_NUM_PULS_BEFORE_THRSH
USS_ALG_SEARCH_LOBE_SAMP
USS_ALG_MAX_RATIO_PEAK_2_PEAK_VAR
USS_ALG_CORR_VAL_THRSH_CHK_FACT
USS_ALG_SIGN_VAL_THRSH_CHK
Question 2
Ultrasonic Sensing Design Center, which can be used with development kits, contains a parameter called Gap between pulse start and ADC capture (us) (on Parameters tab). I used Generate headers function, but was unable to locate this parameter in generated header files.
Where is it located, so I can change it right in my firmware without the need to re-generate headers on my PC?
Question 3
Would it be possible to obtain source codes for the USS library? It would make our further development much faster, since I could have a direct look, how various parameters and functions work. Right now I must search for best configuration quite often using trial & error method, because some parameters have quite an ambiguous description or are part of a function too complex to be described in detail by any design guide.
Thank you for your help.
Best regards
Antonin