Other Parts Discussed in Thread: TMS320F28027
Hello:
I would like an ISR to trigger every time my comparator output goes above a certain voltage. In effect my program will be doing what it is doing, either in an interrupt(INT3) or in the background, and then trigger an asynchronous interrupt(INT2) to run a few calculations and jump back to whatever it was just doing.
Microcontroller:
TMS320F28027 Piccolo
Comp2A
InputA: local Comp2A enable
Inverting pin: DAC set to 512(voltage goes above 1.5V then TZtrip)
TZ_PWM
Initialized PWM4 to 313Hz
ePWM4 Digital Compare bit connected to Comp2out
Async
Set Digital Compare Event 2 to trigger TZ interrupt
ISR_PWM
PieVector ePwm4_TZINT mapped to my specific ISR
Enable ISRs (EINT ERTM)
Specific ISR
Calculations
Clear Interrupt flags
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
My lab test set up:
TMS320F28027 Piccolo TI Dev board
Signal generator 3.2V sine wave output connected to ADCA4 pin (Comp2A)
Oscilloscope
What works:
ADCA4 is working properly
COMP2OUT signal (GPIO34pin) is triggering properly off of signal generator
What does NOT work:
CPU never breaks to Specific ISR routine
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
I hope my intent is clear as outlined above. I read the documentation on ePWM, ISRs, and studied the examples provided by TI, specifically ePWMTrip.c and TripComp.c in the TIsuite as I was unable to find a specific ePWM TZ Trip using the Digital Compare register example.
Thank you for your time!