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.

MSP430FR2676: I2C Slave Read with Delay

Part Number: MSP430FR2676

Hello,

I am trying to set up the MSP430FR2676 as an I2C slave to communicate with a host MPU. I have been able to get the I2C slave to work successfully for both reading and writing basic data. I also have an I2C master set up on the MSP430 that communicates with a few external sensors and drivers that has been working well. I am now trying to do an I2C slave read that is a little more complicated because it requires a delay as part of the read. Below is a step-by-step description of what I need to do:

  1. MPU sends I2C slave read command to MSP430 in order to read value from a sensor
  2. MSP430 enters I2C slave interrupt to process the call from MPU
  3. MSP430 sends an I2C write command to the sensor in order to initiate a measurement
  4. MSP430 I2C slave process must wait for 1 second in order for sensor measurement to complete (This is where I am struggling)
  5. MSP430 sends an I2C read command to the sensor to retrieve measurement results
  6. MSP430 sends measurement data back to MPU

What I am struggling with is how to run a delay in the I2C slave process while allowing the other processes in the MSP430 to run. I know of the __delay_cycles command, but I know that causes the MSP430 to stop running all other processes. Is there a way to do the delay while still allowing other processes to run?

Thanks!

**Attention** This is a public forum