Hello,
I'm looking for some code examples to use the XINT2 pin as SOCA to trigger ADC conversion. Also, the setting of PIE vector table for the interrupt service routine. Can someone help?
Thanks!
Charlie
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.
Hello,
I'm looking for some code examples to use the XINT2 pin as SOCA to trigger ADC conversion. Also, the setting of PIE vector table for the interrupt service routine. Can someone help?
Thanks!
Charlie
Hi Charlie,
I don't think we have an example that does exactly that but we have a couple under controlSUITE\device_support\f2833x\v###\DSP2833x_examples_ccsv5\ that should give you the pieces you need to figure it out:
external_interrupt demonstrates selecting a GPIO for use as the XINT2 input and selecting what kind of pin event triggers the XINT. It also sets up the ISR for the XINT.
adc_soc shows configuration of the ADC to use EPWM1 to generate the SOC, but it should be pretty similar to what you need to do to use XINT2 instead. It also sets up an ADC ISR.
Take a look at those examples, and let me know if you still have questions.
Whitney
Yes, that's exactly what I'm trying to do - getting an interrupt at the end of ADC conversion.
Now, do I need to use both XINT2 and ADCINT or just ADCINT?
In the External Interrupt example:
PieVectTable.XINT2 = &xint2_isr;
In the ADC_SOC example:
PieVectTable.ADCINT = &adc_isr;
Do I need both ISRs?
If you don't need to do anything in the XINT2 ISR (and it sounds like you don't), you don't need to register it in the vector table or enable the interrupt. It sounds like you can just use ADCINT.
Whitney