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.

2805x Problem with EOC interrupts

Other Parts Discussed in Thread: TMS320F28054M

Hi there,

I'm currently working with TMS320F28054M.

I'm using 12 SOCs (+ SOC0 that I throw away as errata suggests) to sequentially sample 2 ADC channels. CPU timer 1 interrupt is a trigger for all these 12 SOCs. I have also one ADC interrupt at the end of conversion series, ADCINT1. The trigger for this interrupt is EOC12.

That's all. And it fails all the time. ADC interrupt is generated thousands of time, instead of one time per CPU timer interrupt as it should be.

However, if I change the ADCINT1 trigger to EOC2, or EOC4, or other value less than 8 it works fine and generates 1 interrupt for 1 CPU timer interrupt as intended. I can't understand what is the problem...

Thanks in advance.

  • Hi Andrei,

    Can you check the settings in the ADC for self-triggering (see below registers).  Sometimes these get set by other functions (notably the ADC offset self-calibration function) but then your user code doesn't overwrite/clear them.

    A debug technique to go along with this is to use a 'scope to check when the ADC is physically sampling.  If you put a large resistor in series with your ADC channel (say 100k) and then connect your scope probe to the pin, you will see the voltage on the pin drop sharply when the ADC samples.  You can use this to tell if you are sampling as often as you think.

  • Thank you Devin,

    this exactly solved my issue. Indeed, the problem was in the AdcOffsetSelfCal() function. It sets all for all ADCINTSOCSEL2 bits (SOCs 8 and higher) the ADCINT1 as a trigger. That explains strange behavior.

    As a side note, AdcOffsetSelfCal() also generates two unwanted interrupts in INT1 and INT2. In the function they clear all internal ADC flags, but the interrupt call is passed to PIEIFR and sticks there, until global interrupts are enabled.

    Thanks again for your help.