Valeo interview question

Write a pseudo code for PWM generation.