Arm Mbed OS support forum

100MHz clock generation

Hi all,

Am trying to generate a 100MHz clock for a project. Could you help me with this?
Though, when I go ahead with the PWM signal, the minimum clock period available is 2us (which in turn is only 500KHz).

Please find the code below:

#include "mbed.h"
#include "LSM9DS1.h"
#include "mbed_power_mgmt.h"

#include <math.h>
#include <time.h>
#include <chrono>

int main() {
    const PinName clk_Ext = PinName::PA_8;
    PwmOut clk_ext(clk_Ext);
 
    clk_ext.period_us(100);
    clk_ext.write(0.50f);

    while(1);
    return 0;
}