Commit graph

3 commits

Author SHA1 Message Date
Damien George
3c1722e705 stm32: Fix extraction of hse/hsi/pllm values from preprocessed source.
The expressions for the `micropy_hw_hse_value` etc variables may contain
parenthesis, eg `micropy_hw_hse_value = ((25) * 1000000)`.  To handle such
a case, simplify the regex and always use `eval(found)` to evaluate the
expression.

Signed-off-by: Damien George <damien@micropython.org>
2024-12-19 00:55:31 +11:00
Andrew Leech
7924b31050 stm32: Generate PLL tables from pre-processed headers.
Allows boards to configure their HSE and PLL values in variants.

Signed-off-by: Andrew Leech <andrew@alelec.net>
2024-12-18 16:55:53 +11:00
MikeTeachman
58112fc49a stm32/machine_i2s: Improve accuracy of SCK frequency.
Configures the I2S PLL to produce a frequency that the I2S clock generator
can use to create an optimal SCK frequency.  The I2S PLL configuration
table is automatically generated at build time.

Fixes issue #10280.

Signed-off-by: Mike Teachman <mike.teachman@gmail.com>
2023-12-06 11:48:03 +11:00