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.

MSP430FR6047: MSP low-power microcontroller forum

Part Number: MSP430FR6047

Hello Everyone ,

I am using my USS center with my EVM430FR6047 board. My goal is to send ADC peak amplitude over UART message. For doing this I am using the parameter i16max_amplitude inside Testing_PostMeasurement_Update(void) function. However I am seeing the parameter as 0 and this is the ADC capture that I am getting. ( As you can see its not a big fish but this is the maximum amplitude that I am able to get with my sensors. Let me know if this is related to that) How can I solve this problem ? what is the reason for that ?

  • Hi Umut,

    Could you show the code snippet that you use to read the iq16max_amplitude variable and send it out via UART? I am not very experienced with this function but looking at it now, I would not expect it to be set to zero after running the algorithm successfully.

    Additionally, your ADC capture does look strange. I have not seen a negative value here in the past. Are you achieving good results in your zero flow drift testing when you have this ADC capture? 

  • Hello, basically I created a function which returns to iq16max_amplitude in Testing.c,

    int16_t Testing_GetMaxAmplitude(void) /* Umut added */
    {

    return i16max_amplitude;
    // return i16max_amplitude;

    }

    and then I am calling my function in my USSLibguiapp.c 

    uss_amplitude = Testing_GetMaxAmplitude();

    int8_t highByte = (uint8_t)(uss_amplitude >> 8); // splitting 2 byte value to 1 byte
    int8_t lowByte = (uint8_t)(uss_amplitude & 0xFF); // splitting 2 byte value to 1 byte

    EUSCI_A_UART_transmitData(EUSCI_A0_BASE, highByte);
    EUSCI_A_UART_transmitData(EUSCI_A0_BASE, lowByte);

    I am aware that my ADC capture does look strange and it is not as expected in the user guide:( However this is the best signal I could get on my pipe and transducers so I am okay to use the amplitude of this signal at least. 



  • I see. As long as you are aware, and you are ok with the waveform you are getting, we can move on. Some variation is to be expected but as long as you are getting the output that you are okay with then we can skip that portion.

    Have you tried hard coding a value to send here first just to verify that the UART send is occurring correctly? And as a second test, have you tried debugging this project to set a breakpoint after running your function to check whether i16max_amplitude is getting the expected value? You could step through the code with the debugger to try to see whether the correct value is found by the Testing_PostMeasurement_Update() function, and that the correct value is passed on to your function. Please try doing this and let me know what you find.

**Attention** This is a public forum