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 everyone.
Has anyone had experience with starting ADC conversion from PWM events?
I'm trying to implement a PWM current control where the eTPWM triggers ADC conversions on ADC1 EVENT group, but the adc notification is not happening. I have had no problem triggering an eTPWM period notification directly, or directly starting an ADC conversion from software and getting an adc notification. I'm working in HalCoGen and I've enabled the VIM channel for ADC1Event. Here is a screenshot of my eTPWM and ADC settings:
I have tried both rising edge and falling edge on the trigger.
Here's the code from my sys_main.c:
/* USER CODE BEGIN (3) */
etpwmInit();
adcInit();
adcEnableNotification(adcREG1, adcGROUP0);
_enable_IRQ();
etpwmStartTBCLK();
while(1) {
}
/* USER CODE END */
I've attached my project files as well.
Any ideas?4024.mypwm.zip