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.

RE: F2808 I2C "None" Interrupt Code ?



A customer using the F2808 is getting an I2C interrupt code of 000, which he was never getting before.  This interrupt code translates to “None” according to the data sheet...

1. What can cause this "none" interrupt?

2. They are going to build a new release for their customer next week, so can they just ignore this code or is it cause for alarm?

Thanks,

-Randy

 

  
  • Randy,

    There are two I2C interrupt vectors. I2CINT1A is the base interrupt vector where the INTCODE is valid. I2CINT2A is for the receive and transmit FIFOs. Are they by chance checking the INTCODE value when they are in the I2CINT2A ISR? I don't think this field is valid in that ISR. If they are correctly checking INTCODE when they are in I2CINT1A, I am not aware of any reason that INTCODE should be 000. Have them check the status of the I2CSTR register instead of reading the I2CISCR.INTCODE bits. At least one of these flags should be set. If multiple flags are set it doesn't tell which one generated the interrupt, but it does at least indicate which conditions occurred. They would then handle the condition they want to in the ISR and manually clear the flag. Just be careful how you clear the flag. These bits are "write-one-to-clear" bits, so if you write your code as:

    I2CSTR |= BIT_I_WANT_TO_CLEAR;

    it will create a read-modify-write instruction and clear all the flags that are currently set. Instead you will want to write the code as:

    if (BIT_0_SET)
    {
       <handle AL condition>
       I2CSTR = 0x0001;
    } else if (BIT_1_SET)
    {
       <handle NACK condition>
       I2CSTR = 0x0002;
    }
    etc...

    Regards,
    Dave Foley