//Reading the default clock frequencies of esp32

#define GPIO_pin 5

uint32_t Freq = 0;

void setup() {
  pinMode(GPIO_pin, OUTPUT);
  Serial.begin(115200);

  Freq = getCpuFrequencyMhz();
  Serial.print("CPU Freq = ");
  Serial.print(Freq);
  Serial.println("MHz");

  Freq = getXtalFrequencyMhz();
  Serial.print("XTAL Freq = ");
  Serial.print(Freq);
  Serial.println("MHz");

  Freq = getApbFrequency();
  Serial.print("APB Freq = ");
  Serial.print(Freq);
  Serial.println("MHz");
}

void loop() {
  digitalWrite(GPIO_pin,HIGH);
  digitalWrite(GPIO_pin,LOW);
}