Jump to content
  • 0

How to Set Trigger ADC from GPT?


nidhisingh

Question

Hi,

I’m using RF7A6M2AF MCU. I’m working at the register level and don’t use Renesas libraries. I’m trying to set up the MCU so I could spark ADC sampling from GPT.

I do have a GPT formerly working in the circle. I did set ADTRAUEN to 1 in the GTINTAD register and GTADTRA to 2, so the ADC trigger event starts early on during the GPT up-count. To confirm that the ELC_EVENT_GPT1_AD_TRIG_A event actually happens I’ve configured an interrupt for it and it does get triggered.

The thing I must be missing is the configuration at the ADC level for the trigger. A single checkup from the software trigger is working rightly and I can see ELC_EVENT_ADC1_SCAN_END related interrupt being triggered but if I configure ADCSR register TRGE and EXTRG fields to enable synchronous trigger I can not get ADC to work. I was looking into the ADSTRGR register to set a trigger for the ADC, but I don’t see an option for the GPT.

What am I missing?

Kind regards.

P.S for more info please visit - https://volt.tech

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...