Hello ,
I want to trigger an i2c master interrupt on data interrupt and to verify if the interrupt has called i linked a pin to scope and i change the state of the pin on each interrupt call.
My interrupt seems to be called just once any idea why ?
Here is how i enable the interrupt:
IntEnable(INT_I2C0);
I2CMasterIntEnableEx( INT_I2C0 , I2C_MASTER_INT_DATA ) ;
interrupt handler:
void I2C0_Handler()
{
I2CMasterIntClear(I2C0_BASE);
if( val == 0 )
{
GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1, GPIO_PIN_1 );
val = 1 ;
}
else
{
GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1, 0 );
val = 0 ;
}
}
interrupt trigger:
while(1)
{
I2CMasterSlaveAddrSet( I2C0_BASE, slave_addr, I2C_HAL_WRITE_OPERATION );
I2CMasterDataPut( I2C0_BASE , src[ndx] );
I2CMasterControl( I2C0_BASE , I2C_MASTER_CMD_BURST_SEND_START );
while(I2CMasterBusy( I2C0_BASE );
}
Scope view:

