Part Number: TMS320F28069M
Other Parts Discussed in Thread: CONTROLSUITE
Tool/software: Code Composer Studio
Hello,
I'm trying to run the I2C module on my Piccolo MCU. I have prepared a HAL driver similar to the other ones with a help of an I2C example from ControlSUITE, but my version encounters a problem I cannot understand.
There is an ISR to send a STOP condition triggered by ARDY bit, similarly as in the example. After sending first byte, CCS goes into the ISR and halts at the place where I would clear the NACK Interrupt bit in I2CSTR register. See a screenshot of how it looks like (note that I didn't create any breakpoint there!). If I delete the 'faulty' line, the same thing will happen at the first 'if' condition. The data byte seems to be sent properly (see the next screenshot of logic analyzer), but nothing more is being sent when I resume the program.
Two basic questions:
1) What may cause the debugger to halt without a breakpoint? Can I track a source of the problem from here?
2) Any idea on what can be the reason for such behavior with I2C module?
An interesting thing is that: after taking a look at the Mode Register when the program is halted, it seems that the MST bit got cleared - what means that my MCU changed state from Master to Slave - how is it possible!?
---------------
CCS window that halts at the highlited line:
And the logic analyzer window:
