MSP430FR6043: Regarding the software program for calcuate gain values

Part Number: MSP430FR6043

Tool/software:

I have a question regarding the software program for calibrating gain values. I understand that it is executed within the function USS_message_code USS_calibrateSignalGain(USS_SW_Library_configuration *config) in the file ussSwLibCalibration.c.

I understand that the gain value is calculated using the following formula:
agcTempGainValue -= (float) ((float)20*log10f((float)maxMeasurementValue));

Since this formula is executed each time, the term (float) ((float)20*log10f((float)maxMeasurementValue) is added or subtracted from the previous agcTempGainValue. Therefore, it seems that even if the maximum amplitude of the input signal is stable, the gain value (agcTempGainValue) does not stabilize. Please let me know if there is any misunderstanding in my understanding.

Regards,

  • Hi, 

    Yes, your understand is correct.

    We need keep this output value in the amplitude range that has best accuracy.

    Therefore, it seems that even if the maximum amplitude of the input signal is stable, the gain value (agcTempGainValue) does not stabilize.

    If this change is not very big, USS module can accept this changes since PGA output can be controlled in a reasonable range.

    This range is not a specific value.

    Regards,

    Helic

  • Dear Helic

    Thank you for your reply.
    For example, assuming that "maxMeasurementValue" is stable at 100 mV, then (float) ((float)20*log10f((float)maxMeasurementValue)) = 40 dB.If the previous "agcTempGainValue" is 10 dB, then calculating
    "agcTempGainValue -= (float) ((float)20*log10f((float)maxMeasurementValue));" results in the current "agcTempGainValue" being 10 - 40 = -30 dB.Furthermore, the next "agcTempGainValue" would be -30 - 40 = -70 dB.This means that "agcTempGainValue" continues to decrease. Is this the correct behavior?I believe that if the value of maxMeasurementValue is constant, the gain value should not change.

    Regards

  • Hi, 

    Since I am not expert of USS.

    But I think this API can be test easily.

    Regards,

    Helic

**Attention** This is a public forum