Valeo Interview Question

Write a pseudo code for PWM generation.