Other Parts Discussed in Thread: C2000WARE
I2C interrupt service routine not triggered?
When I debug/run my code it ends up in a routine called Interrupt_defaultHandler and reports the variables: pieVect=0x0DB1 and vectID 88
My code contains these lines:
Interrupt_initModule(); Interrupt_initVectorTable(); Interrupt_register(INT_I2CA, &i2cAISR); I2C_disableModule(I2CA_BASE); I2C_initMaster(I2CA_BASE, DEVICE_SYSCLK_FREQ, 400000, I2C_DUTYCYCLE_33); I2C_setBitCount(I2CA_BASE, I2C_BITCOUNT_8); I2C_setSlaveAddress(I2CA_BASE, SLAVE_ADDRESS); I2C_setEmulationMode(I2CA_BASE, I2C_EMULATION_STOP_SCL_LOW); I2C_enableInterrupt(I2CA_BASE, I2C_INT_STOP_CONDITION | I2C_enableFIFO(I2CA_BASE); I2C_clearInterruptStatus(I2CA_BASE, I2C_INT_RXFF | I2C_INT_TXFF); I2C_enableModule(I2CA_BASE); if(I2C_getStopConditionStatus(I2CA_BASE)) { return(ERROR_STOP_NOT_READY); } I2C_setSlaveAddress(I2CA_BASE, SLAVE_ADDRESS); if(I2C_isBusBusy(I2CA_BASE)) { return(ERROR_BUS_BUSY); } I2C_setDataCount(I2CA_BASE, (msg->numBytes + 2)); I2C_putData(I2CA_BASE, msg->command); I2C_putData(I2CA_BASE, msg->memoryHighAddr); I2C_putData(I2CA_BASE, msg->memoryLowAddr); for (i = 0; i < msg->numBytes; i++) { I2C_putData(I2CA_BASE, msg->dataBuffer[i]); } // // Send start as master transmitter // I2C_setConfig(I2CA_BASE, I2C_MASTER_SEND_MODE); I2C_sendStartCondition(I2CA_BASE); I2C_sendStopCondition(I2CA_BASE);
INT_I2CA registers vector 0x0DB0 (not 0x0DB1) the register description is:
Name | Vector ID | Address | Size (x16) | Description | Core priority | ePIE group Priority |
INT8.1 | 88 | 0x0000 0DB0 | 2 | I2CA interrupt | 12 | 1 (Highest) |
How is it ending up on an odd address? I don't think that I even register that address "0x0DB1"