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.

Problem in MSP430F2481 in I2c module

Other Parts Discussed in Thread: MSP430F2481

Hello,

I am using MSP430F2481 as slave in I2C communication. My device is running on USB power. When I reset my device (MSP430) using WatchDog, every time first slave to Master communication is screwed. MSP430 suppose to get TX interrupt in order to transmit but it gets RX interrupt. Even if I dont use Rx interrupt MSP430 gets it.

I am following the communication on the oscilloscope. I can see that even if Master is sending write address (Read/Write bit = 1) MSP430 is pulling it to zero. When I reset my device by pulling the power cable on start the I2C communication works perfectly.

Is it a hardware problem MSP430F2481?

 

Please help me.

 

Thanx,

Andy.

 

  • Andy,

    You should not be seeing a difference in the I2C behavior between a PUC (WDT reset) and a POR (pulling the power cable).

    Can you clarify the behavior some more: by RX interrupt, are you polling a flag or do you enable RXIE + GIE and see that the interrupt fires immediately after a start is sent?

    In the case where the master is trying to transmit after a WDT reset but gets an RX interrupt; can you check and see if the UCTR bit is set?

    Regards,

    Priya

     

  • Hello Priya,

    I am using RX/TX interrupts for communication. In my test scenario master is in RX mode, so there is no way that Master transmits after WDT reset. I have checked all the register settings after PUC and POR, seems to be same.

    I face this problem every first start after PUC/Reset. I tried 100s of times and every single time I have faced the same problem and all the time Master is in RX mode.

    When slave ask for the start of the I2c communication, using separate Interrupt line, slave always misinterpret  and generate a RX interrupt.  This happens only for very first communication, from 2nd onwards everything works normally.

     

     

**Attention** This is a public forum