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.

MSP430I2041: Question about SPI communcation

Part Number: MSP430I2041
Other Parts Discussed in Thread: MSP430I2040, , CC3200

What could be the reason of MISO below? It does not answer.

I checked the probe operations are normal.

And the conditions are as below.

MSP430I2041 firmware : Smart Plug Reference Design (tidc791\MSP430i2040_Source\AFEmetrology\emeter-ng\Debug\Exe\EVM_i2040)

Schematic :

Powre Source : Temporarily forced DC 20V and confirmed that the voltage between V1+/- is 60mV.

Main MCU : ESP 32 BT/WiFi module (powered by USB)

  • I'm not very familiar with this Reference Design. What is at the other end of the SPI? Is it the CC3200, or your ESP-32?

    I don't see any pullup/pulldown on MOSI in the schematic, so the fact that it shows up as '0' rather than floating suggests that the other end is running (driving the line). Maybe it just doesn't like the 0x66 command?
  • Hi,
    The other end is the ESP32(LOLIN32 board). I didn't think it needs pullup/down. Now I added 10k of pullup on the line.
    I tried to read 0x60 Active Power, 0x66 Vrms, 0x67 Freq and 0x68 Irms from MSP430i2041.
    So I let the master(ESP32) send the slave(MSP430) 0x60, 0x66, 0x67 and 0x68 commands.
  • If I'm reading your trace correctly, the ESP32 SPI clock is running at about 1MHz, which may be too fast:
    1) The CC3200 code appears (SPI_IF_BIT_RATE) to run the SPI at 100kHz.
    2) Looking at the i2040 code, I'm at all not convinced it can get through its ISR in (8*16)=128 clocks.
    The effect of running too fast would be that the i2040 sees only (higher priority) Rx events and has no chance to queue a (Tx) response.
    ----------------
    Another suggestion: The requests you're using all read measurements, which (if something else is disconnected?) could actually be 0. Try one of the static(-ish) requests, e.g. GET_METER_SYSCONF (0x40) or GET_METER_AFECONF (0x41).

    [Edit: Fixed timing units.]

**Attention** This is a public forum