I2C interrupt is never triggered on MC9S12XEP100

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I2C interrupt is never triggered on MC9S12XEP100

Jump to solution
939 Views
jameshdx80
Contributor II

Hi,

We have been using I2C with interrupts for almost a decade with MC9S12DP512 and it has always worked fine. However, when we migrated to MC9S12XEP100, I2C stopped working. We have checked Application Notes and MC9S12XEP100 manual but nothing seems to help. Our problem is that I2C interrupts are never triggered.

Information we've checked yet:
- I2C without interrupts is working fine.
- Our slave device (RTC) is also working properly.
- We are able to see MC9S12XEP100 I2C peripheral modulating the address on SDA/SCL using a logic analyzer.
- The slave device sends an ACK correctly.
- IBEN, IBIE, MS/SL, Tx/Rx are enabled.

After the slave device ACK is sent, the communication suddenly stops because MC9S12XEP100 does not send more bytes (it does not modulate SCL or SDA lines), since it dependes on entering in I2C interrupt handler which is never triggered. Strangely enough, TCF and IBIF are set after the transmission which are the condition to trigger I2C interrupt, but nothing happens.

Any suggestions?

Thanks in advance.

James.

0 Kudos
Reply
1 Solution
910 Views
jameshdx80
Contributor II

Actually the problem was related to INT_CFADDR, INT_CFDATA and PRIOLVL values. While configuring SCI interrupts, we have messed up this registers.

View solution in original post

0 Kudos
Reply
2 Replies
911 Views
jameshdx80
Contributor II

Actually the problem was related to INT_CFADDR, INT_CFDATA and PRIOLVL values. While configuring SCI interrupts, we have messed up this registers.

0 Kudos
Reply
928 Views
StanoA
NXP TechSupport
NXP TechSupport

Hello James,

It can be caused by the different IIC module in both MCUs. The older one S12DP512 has IIC_V2 but the new one S12XEP100 has IIC_V3. The register’s difference is the IBCR2 register.

Please check the IBSR register for IBAL also.

The next difference is the Interrupt module – V2 in XEP100 versus V1 in older DP512.

Please check it in details and debug step-by-step the code with check registers in detail.

I think it will help you to solve the issue.

Best Regards,

Stano.