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.

MSP430FR5994: Repeated Start issue in I2C

Part Number: MSP430FR5994

Hello,

I have been trying to interface a slave which has non auto incremment buffer.So i have to send the repeated start for reading all the 64 bytes of data stored in the FIFO and i will separate Using a bit shifting.But here i am facing a problem with  sending a repeated start  condition using I2c.So i am getting some irrelevant values.I have modeled the same thing with arduino and it works fine.but when i model the same algorithm in Code composer i get irrelevant values.I will attach both the arduino code and MSP430 code here.please go through that read fifo function in both the programs and drop your suggestions guys.Thanks in advance

Arduino Code:

Link:#include<Wire.h>#define Device_FIFO_DEPTH 10//Registers#define Mode_Regi - Pastebin.com     (Sorry guys, I couldn't able to paste the code here)

CC code:

Link:#include <msp430.h> #include <stdio.h>#include <stdint.h>#include <stdbool - Pastebin.com

  • What slave device are you using? The code says BMP280 but the slave address doesn't match so it seems to be something else.

  • Hey David,

    Thanks for your quick response.I am using MAX30100 pulse oximeter sensor as my slave

  • First of all, a repeated start is only required if there are multiple masters on the bus and you want to avoid the possibility of losing arbitration. If there is only one master, a stop and start is as good as a repeated start.

    It appears as though you are using the byte counter to generate a stop. I have never used this but from the documentation this appears to run for both send and receive. Since I don't see where you either disable automatic stop generation or set a count other than 1, you can't receive more than one byte of data.

    But I might have missed something. The code is organized oddly (for me) and is difficult to follow.

**Attention** This is a public forum