Hi,
I am working on a platform that will be using the TM4C129ENCPDT Arm chip. For development, I'm using the EK-TM4C129EXL.
This will be acting as an I2C/SMBus slave, which will receive commands from a host board acting as the master. My board will parse the command (and any params) sent to it by the master, and return any necessary data when necessary. For testing, I am trying to setup my device in slave mode, and am connecting an Analog Discovery 2 to send commands as an I2C master. Ideally, once the slave receives the stop condition, an interrupt will fire, allowing me to pull the contents of the message from the Rx buffer.
I am using the corresponding SW API for development.
I am having issues getting the I2C interrupt to proc. I've used the AD2 as an I2C master before, so I suspect the issue is likely somewhere in my C code (posted below).
////////////////////////////////////////////////
// code in tm4c129encpdt_startup_ccs.c
extern void i2cIntHandler(void);
...
#pragma DATA_SECTION(g_pfnVectors, ".intvecs")
void (* const g_pfnVectors[])(void) =
{
(void (*)(void))((uint32_t)&__STACK_TOP),
// The initial stack pointer
ResetISR, // The reset handler
NmiSR, // The NMI handler
FaultISR, // The hard fault handler
...
i2cIntHandler, // I2C0 Master and Slave
...
};
////////////////////////////////////////////////
////////////////////////////////////////////////
// code in init.c
#include "init.h"
#include <stdio.h>
#include "inc/hw_i2c.h"
#include "inc/hw_memmap.h"
#include "driverlib/gpio.h"
#include "driverlib/i2c.h"
#include "driverlib/interrupt.h"
#include "driverlib/pin_map.h"
#include "driverlib/sysctl.h"
void i2cIntHandler(void)
{
uint8_t buffer[4] = {0};
uint32_t x = 0u;
x = I2CFIFODataGetNonBlocking(I2C0_BASE, buffer);
uint32_t y = x;
}
void initSMBus(void)
{
GPIOPinConfigure(GPIO_PB2_I2C0SCL);
GPIOPinConfigure(GPIO_PB3_I2C0SDA);
GPIOPinTypeI2CSCL(GPIO_PORTB_BASE, GPIO_PIN_2); // configure SCL line
GPIOPinTypeI2C(GPIO_PORTB_BASE, GPIO_PIN_3); // configure SDA line
SysCtlPeripheralEnable(SYSCTL_PERIPH_I2C0);
while(!SysCtlPeripheralReady(SYSCTL_PERIPH_I2C0));
I2CMasterInitExpClk(I2C0_BASE, SysCtlClockGet(), false);
I2CSlaveEnable(I2C0_BASE);
I2CSlaveFIFOEnable(I2C0_BASE, I2C_SLAVE_RX_FIFO_ENABLE);
I2CRxFIFOConfigSet(I2C0_BASE, I2C_FIFO_CFG_RX_SLAVE);
uint8_t address = 0x12;
I2CSlaveInit(I2C0_BASE, address);
I2CSlaveAddressSet(I2C0_BASE, 0, address);
I2CSlaveIntEnable(I2C0_BASE);
I2CSlaveIntEnableEx(I2C0_BASE, I2C_SLAVE_INT_STOP);
I2CIntRegister(I2C0_BASE, i2cIntHandler);
}
I will also attach a screenshot of my AD2 setup.

Any ideas as to what my issues might be? I am confident that my "master" is correctly connected to the devkit.
Thank you,
Zach Sharp
