Other Parts Discussed in Thread: C2000WARE
Hello,
I want to port the E-Metrology library fom F28P55 to F2800137. I want to enable only single-phase calculations and I do not wish to calculate THD. What steps can I follow to do this?
Hello,
I want to port the E-Metrology library fom F28P55 to F2800137. I want to enable only single-phase calculations and I do not wish to calculate THD. What steps can I follow to do this?
Hello,
Please follow these steps to port the E-Metrology Library from F28P55 to F2800137.
1. Download the E-Metrology library for F28P55 from here.
2. Firstly, in order to enable single-phase calculations and disable THD calculations, you will have to make changes to the template.h file included in the library. Please consult User Guide for E-Metrology Library for Digital Power Applications with F28P55x and F28P65x for help with the same.
3. Once you have made the above changes, build the project in CCS. Check the .map file to make sure that the RAM and Flash usage are less than the RAM and Flash size available in F2800137 device.
4. Once you have confirmed that the project will indeed fit in F2800137, then we are ready to port the project.
5. Import an empty driverlib F2800137 project from C2000Ware into your CCS Workspace and rename it. For example - energy_metrology_f2800137.
6. Delete the default main.c file and change the build configuration to CPU1_FLASH.
7. Copy the following files from energy_metrology_f28p55 project into your F2800137 project.
Source Files
Header Files
Libraries
8. Update driverlib path and Sys Config file.

9. Modify the default Flash Linker file from the f2800137 project 280013x_generic_flash_lnk.cmd for the E-Metrology library.
10. Comment out the #include<fft.h> from all the files (since we are not using FFT functionality to do THD calculation) to make sure you do not get include errors.
Please note the following memory considerations when trying to port the E-Metrology Library for any C28x device
1. E-Metrology with 3-phase support and THD calculation enabled will take 15.8 KB Flash and 40.6 KB RAM.
2. E-Metrology with 1-phase support and THD calculation disabled will take 11.4 KB Flash and 2.1 KB RAM.
3. Disabling phase correction will further lead to a few bytes of memory reduction.
Please find the E-Metrology library migrated for F2800137 here - energy_metrology_f2800137.zip
Thanks and Regards,
Ira