DSPRelated.com
Forums

synchronizing ADC and PWM in TMS320f2812

Started by ngjtech May 14, 2008
Hi,
I am using a ezdsp 2812 for some control purpose. I want to have an
ISR tied to underflow interrupt of Event manager A timer2. In the ISR
i would like to sense a voltage calculate the difference with a fixed
reference based on the difference would like generate PWM pulses. My
question is :

How to make sure I get the latest voltage information in the ADC. If I
give a SOC in the beginning of the ISR, how do I make sure that the
current conversion has happened for that very ISR and i access the
result register which has the value of conversion that happened in the
same ISR and have have calculated the difference?

Is it possible by setting a small delay after SOC and access the
result register after passing the delay period? or any flag check can
be done to make sure conversion has ended and begin rest of the
calculation only after the flag check?

Please advice
Many Thanks
NG.

OMAP35x EVM jump-starts low-power apps
The modular and extensible OMAP35x Evaluation Module (EVM) enables developers to start building applications based on the OMAP35x architecture: http://www.DSPRelated.com/omap35x