Part Number: TMS320F280049
Other Parts Discussed in Thread: TIDA-010243, MSPM0G3507, ADS131M08
Tool/software:
Hello teams,
I am trying to build a 3 phase watt meter, based on reference design TIDA-010243, i am using a C200 f280049 mcu instead of MSPM0G3507. I have successfully implemented the part in which my mcu communicates with ADC ADS131M08, and i have an interrupt routine that reads the V and I samples from the ADC when is asserts the data ready low. Then i have used the metrology library software to perform calculations and get the evaluated powers, but when a sufficient number of samples have been collected, and when the system should calculate the power, i see 0 output, because the calibration parameters are not set.
Can you help me figuring out how to perform calibration with this metrology library? The documentation is not so clear and i am trying to looos in the source code, without success by now. How can i perform calibration using metrology library?
I have these routines in my software:
metrology_init_from_nv_data();
metrology_switch_to_normal_mode();
metrology_init();
...
if ((phase_ready[ph] & PHASE_STATUS_NEW_LOG))
{
phase_ready[ph]=0;
calculate_phase_readings( ph );
.....
the function
calculate_phase_readings( ph );always return zero because calibration data are not set.
How can i perform initial calibration?
Thanks
Emanuele Peruzzi