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.

TMS320F28335: How to ADC initialization based on ePWM interrupt and perform adc_isr

Part Number: TMS320F28335

Tool/software:

I'm trying to measure the the ADC values with the interrupt of ePWM. ePWM is initialized well and counting upwards and doing it's function. But somehow it ain't triggering the ADC to take samples. Attached is my program that I'm trying to run. Need your thoughts or improvements that'd be required to run this code. I'm very new with TI's DSP i don't know much about it yet.

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "DSP28x_Project.h"
#if (CPU_FRQ_150MHZ) // Default - 150 MHz SYSCLKOUT
//
// HSPCLK = SYSCLKOUT/2*ADC_MODCLK2 = 150/(2*3) = 25.0 MHz
//
#define ADC_MODCLK 0x3
#endif
#if (CPU_FRQ_100MHZ)
//
// HSPCLK = SYSCLKOUT/2*ADC_MODCLK2 = 100/(2*2) = 25.0 MHz
//
#define ADC_MODCLK 0x2
#endif
//
// ADC module clock = HSPCLK/2*ADC_CKPS = 25.0MHz/(1*2) = 12.5MHz
//
#define ADC_CKPS 0x1
// Prototype statements for functions found within this file.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

During debugging I see that ADCTRL1 = 0x0000;

I put a breakpoint in the adc_isr to see if it reaches there and it never hits that break point.