GithubHelp home page GithubHelp logo

Comments (6)

bjoernQ avatar bjoernQ commented on July 27, 2024 1

The simplest to start with would be a "boot-default" configuration without actually changing any clock settings. This way drivers can get the clock rates and as soon as we actually make it possible to change clock rates things should "just work"

from esp-hal.

bjoernQ avatar bjoernQ commented on July 27, 2024 1

CPU clock settings for ESP32 and ESP32-C3 are implemented in #110

Will continue with ESP32-S2 and ESP32-S3 then ... after that I would consider this to be done

from esp-hal.

bjoernQ avatar bjoernQ commented on July 27, 2024

I wonder which clocks need to be contained in the clock config struct?

I can think of these:

  • CPU CLK
  • APB_CLK
  • Option: XTAL_CLK
  • Option: FOSC_CLK
  • Option: RTC8M
  • Option: APLL_CLOCK
  • Option: REF_TICK
  • Option: PLL_160M
  • Option: PLL_240M
  • Option: PLL_CLK
  • Option: PLL_D2_CLK

Probably there are more.

The "Option" prefixed ones are not available for all targets. Should they be wrapped by an Option in the struct or just not be contained if not available for the target?

from esp-hal.

MabezDev avatar MabezDev commented on July 27, 2024

Option: XTAL_CLK

Is this really an option? I thought all esp's had some form of crystal clock? It's also the default clock source for a lot of peripherals (at least on the c3, when I skimmed the TRM).

I haven't looked through all the chip trms but this looks like a solid base (maybe we can do some smart grepping of the SVDs to find all clock sources?). It should be easy to determine what clocks are available to the driver and pick the best one. It might get interesting for peripherals like LEDC, where the input clock puts a limitation of certain output frequencies... but we'll worry about that later 😆.

from esp-hal.

bjoernQ avatar bjoernQ commented on July 27, 2024

Option: XTAL_CLK

Is this really an option? I thought all esp's had some form of crystal clock? It's also the default clock source for a lot of peripherals (at least on the c3, when I skimmed the TRM).

Ah true - I just looked at the "Peripheral Clock Usage" table and e.g. S2 doesn't list it as a direct clock source for peripherals but it's an indirect clock source ... 🕵️‍♂️ good point - we should include it

from esp-hal.

bjoernQ avatar bjoernQ commented on July 27, 2024

First part (basically introducing ClockConfig with boot-defaults) has been done in #77

Next task is adding support for actually changing the clock rates

from esp-hal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.