rustbox / esp32c3-vgaterm

VGA Driver and Serial Terminal crates, with embedded applications in mind
MIT License
1 stars 0 forks source link

Set and Measure clock speed #3

Closed dougli1sqrd closed 1 year ago

dougli1sqrd commented 2 years ago

Currently I do not know exactly how to set the clock or clock speed on the esp32-c3. Similarly, it would be nice to measure, in software, the current speed of the core clock.

Apparently the esp32-c3 does not implement the RISC-V CSR mcycle, which counts the number of clock cycles that have passed. So there may be another esp32 specific mechanism for taking this kind of measurement?

sethp commented 1 year ago

I'm pretty sure you figured this out already, right? https://github.com/rustbox/esp32c3-vgaterm/blob/4184e69004751314a15284a9d3831ade11e8355d/src/bin/vgaterm.rs#L165-L194

Feel free to re-open if there's more work to do here!