cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G0 DAC ADC TIM2

JuM
Senior

Using TIM2_TRGO to trigger DAC. That works.

​Now want same TIM2_TRGO also to trigger ADC.

Is that possible ?

Regards Juergen

1 ACCEPTED SOLUTION

Accepted Solutions
JuM
Senior

​One has to set ADSTART bit, no matter if software triggered or hardware triggered...

Depending on the EXTEN [1:0] configuration bits, a conversion either starts immediately (software trigger configuration) or once a hardware trigger event occurs (hardware trigger configuration).

Sorry for bothering...

Regards Juergen

View solution in original post

3 REPLIES 3
JuM
Senior

​Still no TIM2 trigger of ADC.

DAC is running ok: TIM2 is running and triggers the DAC. DAC requests DMA and finally generates a sine wave of 200 Hz.

ADC in standstill with calibration value in DR. No trigger0690X00000ARKQeQAP.jpg

Any idea regarding ADC triggering ?

Regards Juergen

Ozone
Lead II

Not sure about the G0 variant.

But be careful with the debugger. Live-watching certain peripherals registers will clear associated interrupt flags, and alter the program flow.

JuM
Senior

​One has to set ADSTART bit, no matter if software triggered or hardware triggered...

Depending on the EXTEN [1:0] configuration bits, a conversion either starts immediately (software trigger configuration) or once a hardware trigger event occurs (hardware trigger configuration).

Sorry for bothering...

Regards Juergen