Any Arm Mbed C++ example to output clock signal with given frequency?

Is there an Arm Mbed C++ example program to output clock signal with a given frequency and given duty cycle to a GPIO output pin please?

If such example exist, is there URL link please?


Hello Swammy,

The PwmOut can be used for that (in some frequency range).

Hello Zoltan,
Many thanks for this information. Great information. Very helpful.

Next, I need links of Mbed C++ examples to generate Data output waveform on another GPIO pin, that corresponds to this Clock signal and is clocked on rising edge of this clock signal and a random input string of zeros and ones, please? This string of zeros & ones come on UART input from laptop personal computer.

Also, I need to generate a pulse of given duration or of higher duration, on another GPIO pin. This pulse will transfer shift registers data from data buffers to output registers. Any such example Mbed C++ program please?

Again thanks and best regards,

I found following excellent text book is very helpful in developing Arm Mbed C++ programs for creating various clock wave forms etc.:

Thank you.