Part Number: MSP432P401R
Hi,
I written the code for msp432 with cap1188 using embedded c language and CCS IDE.
first i am trying to read one register value so. communication started with write mode with slave address and received the ack also. but the register value is direct sending the 0XFF(255) value. when i am changing the register values default it is sending the 0xFF only. Reading is working properly with 0xff register address value.
// Configure USCI_B0 for I2C mode
EUSCI_B0->CTLW0 |= EUSCI_B_CTLW0_SWRST; // Software reset enabled
EUSCI_B0->CTLW0 = EUSCI_B_CTLW0_SWRST | // Remain eUSCI in reset mode
EUSCI_B_CTLW0_MODE_3 | // I2C mode
EUSCI_B_CTLW0_MST | // Master mode
EUSCI_B_CTLW0_SYNC | // Sync mode
EUSCI_B_CTLW1_SWACK | //transmit mode
EUSCI_B_CTLW0_SSEL__SMCLK; // SMCLK
EUSCI_B0->BRW = 30; // baudrate = SMCLK / 30 = 100kHz
EUSCI_B0->I2CSA = 0x0028; // Slave address
EUSCI_B0->CTLW0 &= ~EUSCI_B_CTLW0_SWRST;// Release eUSCI from reset
EUSCI_B0->IE |= EUSCI_B_IE_RXIE | // Enable receive interrupt
EUSCI_B_IE_TXIE;// | // Enable Tx Mode interrupt