Problems debugging I2C

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

Problems debugging I2C

433 Views
juliancox
Contributor V

I have a  MC9S08QE16 project and I am using CodeWarrior 11.1 and ProcessorExpert. The MCU communicates with a PCF2129 RTC via I2C. when I download and run the code using my Multilink Universal FX it waits for a flag to be set in the ISR (I have one for Tx and one for RX). The flag is cleared before the CI2C1_SendChar or Ci2C1_RecvBlock functions are called, the ISR sets the flag and the calling routine waits for the flag to be set, which never happens.

However, if I disconnect the the multilink cable from the target and then reconnect it the application runs without any problems - apart from the fact that I need to make changes to the code and the "debugging facility" is not connected - apart from the power..

0 Kudos
2 Replies

410 Views
Itzzamna_Supp
NXP TechSupport
NXP TechSupport
It is possible that this error that you are facing is related to the bean that you are using on Processor Expert. Can you please confirm that? 
Also, I may need to see your project to verify 2 possible issues:
  1. It is possible that the BDM is configured on the same port as the I2C
  2. The frequency with the crystal is not the right one.
Let me know if you can share this with me so we can continue with the troubleshoot.
 
Thank in advance!
 
0 Kudos

418 Views
juliancox
Contributor V

Further Information: -

When I launch CodeWarrior the first debug session works fine, but subsequent debug sessions cause the problem. However, if I disconnect and re-connect the USB cable to the Multilink everything is fine, but it is a pain having to do this before each debug session.

0 Kudos