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.

MSP430F6736: Programming code

Part Number: MSP430F6736
Other Parts Discussed in Thread: , MSP-FET

Hi all,

I am using the MSP430F6736. It is a very interesting device. I have done some measurements as testing and i know how to use the device.  I had some problems with IAR's version, but they are solved and i can programming the device (I have tested that it is correct). At this momment i am reprogramming the MSP430F6736 because i have the academic objective (i am a Master's student, thi) of doing a similar system but much more simply.  I pretend only doing measures of current, voltage, active power, reactive power and energies, power factor and frequency for a single phase. The process that i have followed for understanding the code is reading the coments of the slaa517 files (.c and .h, both extension files), seaching the functions  in Internet and IAR software, looking the MSP430F6736A datasheet (www.ti.com/.../msp430f6736a.pdf) and the EVM430F6736 datasheet (www.ti.com/.../slaa517e.pdf).

I began modifying the code of the emeter-foreground.c device (I am reprogramming throught the slaa517 file). The changes that i have done are ok, becausei have used the MSP-FET(http://www.ti.com/tool/MSP-FET) , but i have some doubts.

1. At this momment i am not sure of where are the definitions of the meter which are used in the extension files .c (the definitions are in emeter.h, emeter-toolkit.h, emeter-structs.h, emeter 1-phase.h). I want to say that in the code is common say, for example, "#if defined(MAINS_FREQUENCY_SUPPORT)" , and there are libraries where it iappears "define MAINS_FREQUENCY_SUPPORT". My question about the previous is in which of those are? (emeter.h or emeter 1-phase.h, i supose).

2. There are some variables that i don't understand very good (and i am not sure if they have been used in the EVM430F6736, this doubt is in part interconected with doubdt 1). 

2.1. I know the variable PHASE_CORRECTION_SUPPORT is used because you have a CT in the EVM device, but DYNAMIC_PHASE_CORRECTION_SUPPORT? I think it doesn't  had to be used in this case, but i am not sure and i dont understand very well the explanation.

2.2. LIMP_MODE_SUPPORT. I don't understand the cases in that it could be used. I don't know if it is used in this device.

2.3. NEUTRAL_MONITOR_SUPPORT. It is explained in the emeter.h that "This switch enables monitoring of the neutral lead for anti-fraud purposes.". I don´t understand very good that and if it is necessary that variable for my case

2.4. PER_SENSOR_PRECALCULATED_PARAMETER_SUPPORT. I don't know nothing about that variable because it is not defined in the libraries.

At this moment i have that doubts and i pretend solving that before going to next step (modify emeter-background.c). Can someone help me?

Thanks in advance

  • Hello,

    If you'd like to find where a certain #define has been used across all the files in the projects, you can utilize the advanced search feature in IAR by pressing "Shift" + "Ctrl" + "f".

    PHASE_CORRECTION_SUPPORT allows the phase correction to change as the current changes at an assumed fixed input frequency. I'm not sure if DYNAMIC_PHASE_CORRECTION_SUPPORT is supported (it's included but may not have been tested or fully implemented), but it may allow the PHASE_CORRECTION_SUPPORT to be supported over variable input frequencies.

    LIMP_MODE_SUPPORT accounts for tampering when the voltage inputs are removed, etc. This should not be required in your application.

    NEUTRAL_MONITOR_SUPPORT is also related to tampering. Basically, this allows you to have a 1V, 2C configuration. 1V measures the input voltage, 1C measures Line current, and the other 1C measures Neutral current. If these currents don't match, then tampering is probable. Again, I don't think you need this.

    PER_SENSOR_PRECALCULATED_PARAMETER_SUPPORT is also related to tamper detection and shouldn't be used.

    Regards,

    James

    MSP Customer Applications

  • Hi James,

    Thanks a lot for solve again my last problem. I want to tell you that your answers to my questions have been very clear and effective, helping me a lot with the purpose of doing my project. Your answers have done that i advance a lot in the project. My congratulations for the effectivity in your answers.

    Thanks again.

    Miguel

**Attention** This is a public forum