Trigger ADC with PWM on IMX1064

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Trigger ADC with PWM on IMX1064

Jump to solution
994 Views
Carlio
Contributor II

Hi there,

I am trying to trigger the ADC1 on the IMX1064 via PWM1 by utilizing AD_ETC and XBAR functionality (in a similar fashion as in AN12214). I have used the config-tools -> peripherals settings to do this but I can´t seem to get the ADC_ETC to be triggered by the PWM submodule 0 counter. How would you go about to use the pinmux tool and peripheral tool to trigger the ADC1 with a PWM signal? 

Best regards,

Carl

0 Kudos
1 Solution
959 Views
Carlio
Contributor II

So, I got it to work when I started from a new project. If someone else needs to do this in the future, the way I did it was by creating a new project and including the relevant drivers right away: 

Carlio_0-1620633646101.png

Then, I configured (in the pinmux tool) ADC_ETC to be triggered by the flexpwm signal and also configured the pins used for the ADC and PWM like so: 

Carlio_2-1620634190250.png

 

After this, I set up the PWM1 submodule 0 in the peripheral tools to be triggered by VAL2 (since I will only use PWM1A for this application): 

Carlio_1-1620634079576.png

Next, the XBAR configuration for the ADC_ETC was configured like this: 

Carlio_3-1620634327291.png

And lastly, the ADC: 

Carlio_5-1620634467230.png

 

Also note that all peripheral use the same clock source (here IPG_CLK_ROOT - BOARD_BootClockRUN: 150 MHz). 

AN12214 was of great help as well as this article https://www.programmersought.com/article/84265106737/ 

View solution in original post

0 Kudos
1 Reply
960 Views
Carlio
Contributor II

So, I got it to work when I started from a new project. If someone else needs to do this in the future, the way I did it was by creating a new project and including the relevant drivers right away: 

Carlio_0-1620633646101.png

Then, I configured (in the pinmux tool) ADC_ETC to be triggered by the flexpwm signal and also configured the pins used for the ADC and PWM like so: 

Carlio_2-1620634190250.png

 

After this, I set up the PWM1 submodule 0 in the peripheral tools to be triggered by VAL2 (since I will only use PWM1A for this application): 

Carlio_1-1620634079576.png

Next, the XBAR configuration for the ADC_ETC was configured like this: 

Carlio_3-1620634327291.png

And lastly, the ADC: 

Carlio_5-1620634467230.png

 

Also note that all peripheral use the same clock source (here IPG_CLK_ROOT - BOARD_BootClockRUN: 150 MHz). 

AN12214 was of great help as well as this article https://www.programmersought.com/article/84265106737/ 

0 Kudos