Skip to content
Commit 0fd9afd9 authored by Andy Ross's avatar Andy Ross Committed by Anas Nashif
Browse files

esp32: Fix board cycle frequency



The ESP-WROOM-32 board exits the bootloader at 40 MHz, not 160 MHz as
suggested by documentation.  The CCOUNT special register works as
advertised, but not at the expected rate.  This was verified by
timestamping (at the host) the output of a dependency-free loop that
looks like:

	int key = irq_lock();
	while(1) {
		u32_t i, count;
		volatile int dummy;

		for(i = 0; i < 5000000; i++) {
			dummy++;
		}

		__asm__ volatile ("rsr.ccount %0" : "=a"(count));
		printk("%d\n", count);
	}

The SoC has a fairly robust set of possible CPU clocking modes, but we
don't have a driver for that yet.  Until we do, set the single
configured CPU frequency to the one we get at runtime.

Signed-off-by: default avatarAndy Ross <andrew.j.ross@intel.com>
parent eb48a0a7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment