Other Parts Discussed in Thread: CC3200, MSP430I2041
As the title states, I'm using the EVM430-i2040SUBMTR EVM.
I'll be connecting a host microcontroller (specifically, the CC3200) to this board to use it in a project.
This EVM simplifies the project because we do not need to design/program the metrology of the MSP430i2041 since the board comes pre programmed with demo firmware that measures parameters (voltage, current, power, PF, frequency etc.) and sends it to the metering demo software on the computer.
I've read through the documentation of the EVM (SLAA638 & SLAU587) and am attempting to decode the protocol so that I can send commands & read the measured parameters from the CC3200.
I connected the EVM to a load and used a serial port sniffer tool to capture the commands the TI demo program was sending to the EVM, and the response packets the EVM was sending back to the demo program (on the PC).
I managed to capture upstream & downstream packets and decoded them using the formats given in SLAU587 (Chapter 4 - "Serial Communication Commands"). The packet formats, values in the headers and lengths match what I expect based on the documentation, but I can't get meaningful readings for the actual measured parameters: Voltage, Current, Power etc.
For example:
The EVM sent the computer this:
FE FE FE FE 68 99 99 99 99 99 99 68 23 22 61 80 7C 92 03 00 F4 21 1F 00 15 48 07 00 CF FC FF FF D4 49 07 00 FA D8 BD 13 FA 2D 00 00 53 F2 E1 FF 10 16
Based on the documentation, this is a response to a preceding packet "HOST_CMD_GET_READINGS_PHASE_n"
I tried decoding the values after "FE FE FE FE 68 99 99 99 99 99 99 68 23 22" since this is the header + length (0x22 = 34, which is correct).
61 80 - these two bytes (offsets 0 & 1) are RSPH & RSPL
7C 92 03 00 - Offset 2, Width S32 (Signed 32?) = Voltage in mV In BIN = 01111100100100100000001100000000, as a signed 32bit int: 2089943808 mV?
F4 21 1F 00 - Offset 6, Width S32 (Signed 32?) = Current in μA In BIN = 11110100001000010001111100000000, as a signed 32bit int: -199155968 μA ?
15 48 07 00 - Offset 10, Width S32 (Signed 32?) = Active power in mW Similarly.....
CF FC FF FF - Offset 14, Width S32 (Signed 32?) = Reactive power in mW
D4 49 07 00 - Offset 18, Width S32 (Signed 32?) = Apparent power in mW
FA D8 - Offset 22 Width S16 (Signed 16?) = Power factor in 0.001 Decimal (Signed 16bit) = -1320 (I noticed that all readings have FA D8, almost no variation here)
BD 13 - Offset 24, Width S16 (Signed 16?) = Frequency in 0.01 Hz BIN = 1011110100010011, signed 16b = -17133 unsgined int = 48403. SLAU587 says 0.01Hz, which would make it 48403*0.01 = 484.03Hz
FA 2D 00 00 - Offset 26, Width S32 (Signed 32?) = Voltage Channel DC Offset
53 F2 E1 FF - Offset 30, Width S32 (Signed 32?) = Current Channel DC Offset
10 16 - Checkum + End Byte
As I mentioned previously, these were captured using a serial sniffer, so the TI demo tool was running simultaneously and displaying what seemed to be readings that were accurate:
The serial sniffer is in the background, and had received packet 2582 when I captured the screenshot. (The packet I used as an example is packet 2566).
tldr; could you help me decode the values of voltage, current, power etc. in the packet to the actual values that are displayed by the demo GUI?