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.

CCS/MSP430FR6043: I2C function failed when called from an ISR

Part Number: MSP430FR6043

Tool/software: Code Composer Studio

Hi,

Have a problem calling a I2C function from an ISR.

I2C_write_byte(),I2C_read_byte(). function works 100% ok in the main loop but not in the ISR

It always hang up at the infinite loop.

I2C interrupt is not using for I2C_write_byte(),I2C_read_byte() operation.

So problem is there only I2C_write_byte(),I2C_read_byte() is placed in an ISR

#pragma vector=PORT1_VECTOR
__interrupt void port1_isr_handler(void)
{
char rx_value=0;
if(P1IFG & BIT1 )
{
if( P1IES & BIT1 )
{
I2C_write_byte(0x0020,0xbf);
rx_value=I2C_read_byte(0x0020);


}
P1IFG = 0; // Clear all P1 interrupt flags
}
}

Anyone related please reply asap,

Thanks in advance

Prakash

**Attention** This is a public forum