Git Product home page Git Product logo

Comments (5)

jcw avatar jcw commented on July 3, 2024 2

The following changes to mpconfigboard.h appear to work:

// HSE is 25MHz
#define MICROPY_HW_CLK_PLLM (25) // divide external clock by this to get 1MHz
#define MICROPY_HW_CLK_PLLN (400) // PLL clock in MHz
#define MICROPY_HW_CLK_PLLP (1) // divide PLL clock by this to get core clock
#define MICROPY_HW_CLK_PLLQ (2) // ...
#define MICROPY_HW_CLK_PLLR (1) // ...

#define MICROPY_HW_CLK_PLL3M (25) // divide external clock by this to get 1MHz
#define MICROPY_HW_CLK_PLL3N (240) // PLL clock in MHz
#define MICROPY_HW_CLK_PLL3P (2) // divide PLL clock by this to get core clock
#define MICROPY_HW_CLK_PLL3Q (5) // divide core clock by this to get 48MHz
#define MICROPY_HW_CLK_PLL3R (2) // ...

After upload, I get:

MicroPython v1.12-659-g441460d81 on 2020-07-26; MCUDEV DEVEBOX STM32H7XX_M with STM32H7XX
Type "help()" for more information.
>>> import machine
>>> machine.freq()
(400000000, 200000000, 100000000, 100000000)
>>>

I'm not 100% convinced this is correct, as it appears that this is running the VCO in wide-range mode, which goes from 2..16 MHz, whereas the divider defined above feeds it with 1 MHz (other values would need changes in ยตPy code). So maybe it's running out of spec, but this does make the CPU run at 400 MHz, and USB also works.

from mcudev_devebox_h7xx_m.

Pinnchus avatar Pinnchus commented on July 3, 2024

I slightly change your Clock definitions, to this, according with https://github.com/micropython/micropython/blob/master/ports/stm32/boards/NUCLEO_H743ZI/mpconfigboard.h

#define MICROPY_HW_CLK_PLLM (5) // divide external clock by this to get 5MHz
#define MICROPY_HW_CLK_PLLN (192) // PLL clock in MHz
#define MICROPY_HW_CLK_PLLP (2) // divide PLL clock by this to get core clock 480Mhz
#define MICROPY_HW_CLK_PLLQ (2) // ...
#define MICROPY_HW_CLK_PLLR (2) // ...

#define MICROPY_HW_CLK_PLL3M (5) // divide external clock by this to get 5MHz
#define MICROPY_HW_CLK_PLL3N (48) // PLL clock in MHz
#define MICROPY_HW_CLK_PLL3P (2) // divide PLL clock by this to get core clock
#define MICROPY_HW_CLK_PLL3Q (5) // divide core clock by this to get 48MHz
#define MICROPY_HW_CLK_PLL3R (2)

from mcudev_devebox_h7xx_m.

whatcall avatar whatcall commented on July 3, 2024

Save issue.
Please apply the proper patch from proposals above.

from mcudev_devebox_h7xx_m.

eurol avatar eurol commented on July 3, 2024

#define MICROPY_HW_CLK_PLLP (2) // divide PLL clock by this to get core clock 480Mhz

480MHz is supported if the chip revision is V. In case of revision "Y" maximum clock is 400MHz (errata: https://www.st.com/resource/en/errata_sheet/dm00399555-stm32h750xb-and-stm32h753xi-device-limitations-stmicroelectronics.pdf, 2.2.20 at page 16).

from mcudev_devebox_h7xx_m.

jcw avatar jcw commented on July 3, 2024

480MHz is supported if the chip revision is V

Yup. And if you just want the highest achievable clock, this can be automated - see my example here:

https://git.jeelabs.org/jcw/jeeh/src/branch/master/arch/stm32.cpp#L110-L116

from mcudev_devebox_h7xx_m.

Related Issues (13)

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.