Quantcast
Channel: MSP low-power microcontroller forum - Recent Threads
Viewing all articles
Browse latest Browse all 22223

MSP430FR5969: MSP430FR5969 I2C Configuration and Testing

$
0
0

Part Number:MSP430FR5969

Hello,

I'm currently trying to configure the MSP430FR5969 to read from a Si1133. Communication is to be done through I2C.

My difficulty is with the proper order of configuration for this interface. From what I've read (through other discussions and datasheets), I should be able to make use of  eusci_b_i2c and drivelib packages.

The user in this thread is more or less trying to accomplish the same thing.

This is how I see the process working from the Master side:

  1. Initialize GPIO pins (SDA, SCL)
  2. Initialize Master parameters
  3. Initialize Master
  4. Set the Slave Address
  5. Set the mode (Transmit in this case)
  6. Enable I2C block
  7. Transmit Data
  8. Stop

The the 'Transmit Data' Part  is what I am questioning. 

According to the Si1133 Datasheet, a simple write sequence consists of the following order of commands (from the Master):

  1. Start
  2. Send Slave Address
  3. Set Write
  4. Receive ACK
  5. Send Register Adress
  6. Receive ACK
  7. Send Data
  8. Receive ACK
  9. Send Stop

Now the eusci_b_i2c library provides functions that send a START, then DATA, then STOP, all in one call. But I don't believe that's what I want to do here.

As a starting point, all I would like to do is send the SLAVE Address, then read the ACK. Where exactly is the ACK sent? I imagine it's flag, just unsure of what one.
Perhaps using getInterruptStatus is a way to check?
Also, is it possible to check if the ACK was received while in Debug?

Feel free to ask for any clarification. For context, I'm a student trying to learn bare-metal C.

Thank you


Viewing all articles
Browse latest Browse all 22223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>