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.

CCS/MSP430F6779: Getting Started with EVM Board and EMDC Program - Cannot Communicate with I2C

Part Number: MSP430F6779
Other Parts Discussed in Thread: UNIFLASH, EVM430-F6779, MSP-TS430PEU128, MSP-ISO, MSP-EXP430F5529LP, MSP430F5529, ,

Tool/software: Code Composer Studio

[Edit from TI] Make sure you're using the latest EMDC version. Also, several updates were made to the v1.40 documentation to provide more clarity about the communication protocol than the v1.30 documentation.

Hi everyone,

I'm 100% new at using the entire TI-suite (MSP430, CCS, EMDC, UniFlash, all of it!), so please bare with me as I ask questions which may seem easy to those veterans out there.

In any case, I'm having troubles following the EMDC guide here, and getting the desired results:
software-dl.ti.com/.../ch_designcenter.html

I'm using the
EVM430-F6779, which comes with an
MSP430-F67791A chip soldered on it.
www.ti.com/.../EVM430-F6779

For production however, we want to use the
MSP430-F6779 (without 1A), as we do not need any of the AES encryption features for our product.
www.ti.com/.../MSP430F6779

We bought the
MSP-TS430PEU128 clamshell to breakout the pins on the chip.
www.ti.com/.../MSP-TS430PEU128

We got the MSP-ISO to isolate from high voltages on the EVM.
www.ti.com/.../MSP-ISO

We bought the recommended LaunchPad device for getting started programming the device:
MSP-EXP430F5529LP
www.ti.com/.../MSP-EXP430F5529LP



Now, the first-bit seems to work OK, on the EVM. I went through the following process to get the EVM up and running:

1) Installed EMDC, CCS, UniFlash

2) Connected the LaunchPad with all jumpers populated. UniFlashed the following to my MSP430F5529 chip on the LaunchPad device:
C:\ti\msp\EnergyMeasurementDesignCenter_1.40.00.03\EnergyMeasurementDesignCenter\hidbridge\TI_MSP_HIDBRIDGE__1_00_04_00__MSP-EXP430F5529LP.txt

3) Wired the LaunchPad - ISO - EVM like so:



4) Opened EMDC. Opened the sample
MSP430F6779 project (EVM430-F6779_CT_3V_3C_60Hz). Modified the chip to be the
MSP430F67791A chip instead. Filled in all the blanks this created after changing the chip. Used the "Generate" button to create a full CCS project.

5) Opened CCS and imported the project. Ran the program in debugging mode and pressed "play" to continue the program.

6) Re-opened EMDC.
Opened the
MSP430F67791A project I had created.
Communications -> Connect.
Double-clicked the MSP430 chip in the GUI.
Went to "Calibration" tab. Clicked "Phase A" -> "Gain" -> "Start" -> "Stop".
(It appears this is necessary, in order to force the program to start communicating with the chip?)
Went to "Results" tab.
Everything here looks good! It's measuring and reporting back. Connecting load to the EVM changes the readings.



Now...

When I try to do the same process for the MSP430F6779 by itself, in a clamshell, this is where I have no luck.

I did the following:

A) Wired the LaunchPad - ISO - MSP430F6779 clamshell like so:



B) Repeated steps 4, 5, 6 above, for the
MSP430F6779 chip instead.

C) Upon opening the "Results" pane in EMDC, I get nothing! It's empty! Blank! No values in the Results tab :(

I've tried:
- Replacing my jumpers between the MSP-ISO and the MSP430 clamshell,
- Checking my solder points for continuity on the clamshell,
- Swapping RX & TX lines to see if that's where I went wrong,
- Pausing the debugger in the middle of the program, just to be sure it's actually powered and running (it does appear to be running),

Any ideas?
Help?

  • 1. I think you are communicating through UART not I2C.

    2. I can't see there is any problem with your connection. As the tools chain works well with our EVM. I think the problem may happens on F6779 side. My advice is that:

    a. Check the power supply of F6779(AVCC, DVCC)

    b. Check whether the code runs on F6779 well in debug mode

    c. Check if there is data output from F6779 through TXD

  • Before I test for communications, what settings should I attempt for communicating?

    The MSP-EXP430F5529LP firmware from EMDC appears black-box, so I have no idea how that's communicating with the EVM.

    Should the MSP430F6779 have the same communication as the EVM?

    I assumed both were using I2C because of all the I2C routines in the project files. What does it use by default? Why is the MSP-EXP430F5529LP required?

  • For the communication protocol between F5529 and F6779, you can refer to this: 

    I think this picture can help you understand how EMDC, F5529, F6779 work in the system. The reason why it need F5529 is that EMDC only can recognize a HID device, not a COM port device. That is why we need F5529 not a UART to USB converter.

  • Hi Eason,

    I checked (a) (b) and (c) above on the clamshell.
    AVCC and DVCC are fine (3.3V), code is running well in debugging mode, but TXD isn't sending anything or responding to commands. What pins should EMDC communicate on? I assumed 16 and 17, is this wrong?
    I have not made any changes to the EMDC generated code, it's programmed straight from EMDC as-is.

    I went back to the F6779 EVM, where I know it communicates OK with the EMDC program, to see if I could swap the HID with a regular serial connection.

    I followed the guide here:
    e2e.ti.com/.../800439

    I plugged in this cable to the EVM:
    www.amazon.com/.../

    I applied 3.3V to the EVM to startup the chip. Then, opened Serial Port Utility with:
    Baud: 250,000
    Data Bits: 8
    Parity: None
    Stop Bits: 1
    Flow Type: None

    Per the other guide, they say to test with this command:

    From To Sync Byte Blank Byte Length Byte ID Byte Command Byte Read/Write Payload (Application Mode) Checksum LSB Checksum MSB
    EMDC Target 0x55 0xAA 0x06 0x04 0x01 0x01 0x01 0x07 0x00

    Now, sending 55 AA 06 04 01 01 01 07 00 produces an unexpected result.

    Why does this not match the structure of the manual?

    I'm having a lot of trouble making sense of the resulting output, any guidance would be greatly appreciated.

  • Sorry, the image didn't save in the post. Attempt #2.

    This is Serial Port Utility's results which I'm having trouble interpreting.

  •  As I can check, the COM port configuration is right. Can you capture more data.

    About the guidance, sorry, I don't more on my side.

    The data looks like the one posted in this thread:

  • Okay, making a little more progress on this.

    Question 1:
    It seems like there's only a way to put the HMI into "IDLE" or "ACTIVE" modes, where I'm either receiving nothing, or constantly receiving new values.
    Is there any command I can send to just receive all of the latest measurements back one time? (Not repeatedly)?

    Question 2:
    How can I keep a running total of the max current, in case there is a fault?
    I can't seem to find the loop where values are getting actively updated.

    Question 3:
    How are negative values handled in the byte-representation of the measurements?
    E.g. Say I have positive Watts, and negative Vars. How is this handled in the byte-representation, can you give an example of how to translate some of the below values to regular values?

    After putting things into NotePad, and splitting by "55 AA" as new-line characters, this seems to be more clear now, but the manual needs some clarifications.

    First: It needs to mention somewhere that the Sync Byte, and the Blank Byte (0x55, 0xAA) are REQUIRED before the command packets.
    This was not clear in the manual, and took quite some time to find in the forums.

    Second: The reason I couldn't find the descriptions for the sections of the packets, is because in the manual link below, it says "0xB0" is for VRMS, etc, when it should be "0x80".

    software-dl.ti.com/.../ch_comm_protocol.html

    EDIT from TI: This has been updated in EMDC v1.40.

  • Additionally, I noticed something peculiar.

    When using the EMDC generated code on the EVM430-F6779, with a 1288w space-heater plugged in at 120V on "phase A" of the inputs, EMDC shows only 2.61w of power on Phase A.

    For a while, I thought I had to be translating the Bytes incorrectly. Nope!

    Voltage actually reads properly, at 115 volts (This lines up nicely with my multi-meter), but power usage does not.

    Is there something I've missed here in calibration?
    Are the CT ratios from the default EMDC projects not aligned with the actual EVM430-F6779 device?
    When I looked, they seemed reasonable. Where do those ratios get put into code?
    How do I modify those sale factors in an EMDC project?

    I tried generating EMDC projects 2-times. Once with a CT ratio of 2,000, and a burden resistor of 13 ohms. I tried again, with a ratio of 2,000, and burden resistor of 6 ohms (for Phase A). Generating code for both projects, then doing a full folder-comparison between the two project folders, the only file which changed was "EM_userConfig.c", and the change was on line 78:

            .gain = SD24_B_GAIN_2, vs
            .gain = SD24_B_GAIN_1,

    Using the "Calibration" tab of EMDC doesn't appear to help at all.
    Is there some guide on how to use that section of the program to get the correct gains?
    Where in the EMDC projects can I set approximate gain factors, which will be fine-tuned later?

  • Okay, I attempted 1 other thing:

    EM_userConfig.c, on line 180, I modified the g_emPhaseCalibration.currentSF value.

    Re-compiling and re-programming, then checking the output values, it doesn't look like this had any impact.

    Alas, I'm not sure where to go from here.

    Help?

  • Hi Ben,

    I think you have too many questions. Can you ask one by one?

    I must say I am not a real expert on EMDC. I also need to check the code and document like you.

    Question 1: Yes, this driverlib is used for e-meter, which requires constant data. If you don't want that, I think you need to look into the code and rebuild the communication part.

    Question 2: The software is not totally open source. I am not sure how it will handle the error data. 

    Question 3: You can see it is a int64_t format value. It use the last bit to represent positive and negative.

    For calibration, you need a AC source and a AC load to do calibration.

**Attention** This is a public forum