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-FR6043: Water flow meter design

Part Number: EVM430-FR6043

Dear Experts,

Currently i am working with EVM-430-FR6043 for ultrasonic water flowmeter, i have some doubts regarding store/retrieve the data to FRAM/FLASH

there is any default function to store the below function return value

float resultsCalcVolume(uint16_t rate)
{
// Scale the Volume data based upon the correct Flow Rate unit
if(GPM == g_ResultsOfLastMeasurement.FR_unit)
{
return (float)( ( (float)g_ResultsOfLastMeasurement.last_FlowRate *
(float)rate )
/ ( (float) MILLISECONDS_IN_MIN) );
}
else
{
return (float)( ( (float)g_ResultsOfLastMeasurement.last_FlowRate *
(float)rate )
/ ( (float) MILLISECONDS_IN_HOUR) );
}
}

The above function is calculate the total flow or not?

if there is any function available for store the total flow and retrieve the stored data from FRAM/FLASH kindly let me know else kindly guide me the correct path,

which is the best FRAM/FLASH for store the total flow continuously(30sec/10sec Interval) and retrieve the data 

regards

surya

  • Hi Surya,

    This is an FRAM device - so the data must be stored in FRAM. There isn't a special procedure required to write to FRAM(just initialize the buffer that you want to write to)  The code you're referring to above calculates the volume over a single period. This number has to be added to a sum over time which is done in this line of code:

    g_ResultsOfLastMeasurement.last_volume += resultsCalcVolume(rate);

    BR,
    Leo

  • Hi 

    Thanks for the answer, i can't find the function to write and read the total flow data through FRAM.

    i have checked in hmi.c, lcd_statemachines.c, and hal_system.c but i can't find those functions, kindly help to find which header have those functions,

    regards

    surya

  • Hi Surya,

    This is in lcd_statemachine.c:

    void lcd_statemachine_stateUpdate(void)

    BR,

    Leo

  • Hi

    Thanks for the quick response, that is for display the value to LCD but i am asking about FRAM, i am trying to store and retrieve the total flow data through FRAM, but i can't find those functions, so kindly help to find which header have those(read/write) functions,

    regards

    surya

  • Hi Surya,

    If you look at the .map file output when you build the project you'll see that g_lcd_statemachine is allocated to FRAM:

                      0000769a    0000000c     lcd_statemachine.obj (.TI.persistent:g_lcd_statemachine)

    There isn't a special function required to read and write from FRAM, you just need to declare whatever you want allocated to FRAM as persistent.

    BR,
    Leo

**Attention** This is a public forum