PWM synchronization with EOC of ADC

Hello Guys:

I´m trying to find some example code for STM32f103VE and the STM32-Sk eval board. I want to achieve one PWM signal synchronizated with and ADC.

The ADC has an frecuency conversion (20MHz), and a Conversion time (1uS). When it has finished, and EOC flag is set and the PWM signal is established. So the PWM has the same frecuency (20Mhz) with a 1us delay. So with the value of ADC the code must define the duty cycle, must create it, and wait for the next conversion.

I´ve read something about TIM1&TIM8 advanced control timer in STM32, and ADC synchro but I haven´t be able to find the code.

Best Regards