STM32F107 clocks


Gunnar Bråding
 

Awesome! Worked like a charm. Thanks a bunch!

Cheers,
— Gunnar

On 16 Apr 2021, at 15:10, Attie Grande <attie.grande@argentum-systems.co.uk> wrote:

Hi Gunnar,

We got the PLL2 code into the STM32CubeF1 codebase a little while ago [1].
There are also some patches for adding this support into Zephyr, but I
need to revisit them / make a PR now that the PLL2 support was merged
into STM32CubeF1... [2][3][4].

I hope that helps!

Attie

[1]: https://github.com/STMicroelectronics/STM32CubeF1/commit/f5aaa9b45492d70585ade1dac4d1e33d5531c171
[2]: https://github.com/argentum-systems/zephyr/commit/6c167af50aeca2fc5f6e760de205807fda51c1c9
[3]: https://github.com/argentum-systems/zephyr/commit/cb65e6da942f907b63f0711b57318839561264b6
[4]: https://github.com/argentum-systems/zephyr/commit/da99de64bcf9cbb3dc8a2e1da2e0a4fb9f45258b


On Thu, 15 Apr 2021 at 14:29, Erwan Gouriou <erwan.gouriou@linaro.org> wrote:

Hi Gunnar,

Unfortunately, we miss code for PLL2 configuration as PLL input.
Though, I'm adding Attie who investigated that point and may have code to get it working.

BR
Erwan

On Thu, 15 Apr 2021 at 10:51, Gunnar Bråding <gunnar@astrogator.se> wrote:

Hi!

I got a board with the crystal at 25MHz, and need to use the PLL2 as input to the system clock.
I just do not seem to understand the code enough to see how to set the prediv and multiplication for the PLL2
I can choose PLL2 as input to the PLL, and PLL as input to the system clock, but how do set the parameters for PLL2?

Any pointers would be very much appreciated.

Cheers,
— Gunnar




Erwan Gouriou
 

Awesome, thanks for sharing Artie!


Le ven. 16 avr. 2021 à 15:11, Attie Grande <attie.grande@...> a écrit :
Hi Gunnar,

We got the PLL2 code into the STM32CubeF1 codebase a little while ago [1].
There are also some patches for adding this support into Zephyr, but I
need to revisit them / make a PR now that the PLL2 support was merged
into STM32CubeF1... [2][3][4].

I hope that helps!

Attie

 [1]: https://github.com/STMicroelectronics/STM32CubeF1/commit/f5aaa9b45492d70585ade1dac4d1e33d5531c171
 [2]: https://github.com/argentum-systems/zephyr/commit/6c167af50aeca2fc5f6e760de205807fda51c1c9
 [3]: https://github.com/argentum-systems/zephyr/commit/cb65e6da942f907b63f0711b57318839561264b6
 [4]: https://github.com/argentum-systems/zephyr/commit/da99de64bcf9cbb3dc8a2e1da2e0a4fb9f45258b


On Thu, 15 Apr 2021 at 14:29, Erwan Gouriou <erwan.gouriou@...> wrote:
>
> Hi Gunnar,
>
> Unfortunately, we miss code for PLL2 configuration as PLL input.
> Though, I'm adding Attie who investigated that point and may have code to get it working.
>
> BR
> Erwan
>
> On Thu, 15 Apr 2021 at 10:51, Gunnar Bråding <gunnar@...> wrote:
>>
>> Hi!
>>
>> I got a board with the crystal at 25MHz, and need to use the PLL2 as input to the system clock.
>> I just do not seem to understand the code enough to see how to set the prediv and multiplication for the PLL2
>> I can choose PLL2 as input to the PLL, and PLL as input to the system clock, but how do set the parameters for PLL2?
>>
>> Any pointers would be very much appreciated.
>>
>> Cheers,
>> — Gunnar
>>
>>
>>
>>


Attie Grande <attie.grande@...>
 

Hi Gunnar,

We got the PLL2 code into the STM32CubeF1 codebase a little while ago [1].
There are also some patches for adding this support into Zephyr, but I
need to revisit them / make a PR now that the PLL2 support was merged
into STM32CubeF1... [2][3][4].

I hope that helps!

Attie

[1]: https://github.com/STMicroelectronics/STM32CubeF1/commit/f5aaa9b45492d70585ade1dac4d1e33d5531c171
[2]: https://github.com/argentum-systems/zephyr/commit/6c167af50aeca2fc5f6e760de205807fda51c1c9
[3]: https://github.com/argentum-systems/zephyr/commit/cb65e6da942f907b63f0711b57318839561264b6
[4]: https://github.com/argentum-systems/zephyr/commit/da99de64bcf9cbb3dc8a2e1da2e0a4fb9f45258b

On Thu, 15 Apr 2021 at 14:29, Erwan Gouriou <erwan.gouriou@linaro.org> wrote:

Hi Gunnar,

Unfortunately, we miss code for PLL2 configuration as PLL input.
Though, I'm adding Attie who investigated that point and may have code to get it working.

BR
Erwan

On Thu, 15 Apr 2021 at 10:51, Gunnar Bråding <gunnar@astrogator.se> wrote:

Hi!

I got a board with the crystal at 25MHz, and need to use the PLL2 as input to the system clock.
I just do not seem to understand the code enough to see how to set the prediv and multiplication for the PLL2
I can choose PLL2 as input to the PLL, and PLL as input to the system clock, but how do set the parameters for PLL2?

Any pointers would be very much appreciated.

Cheers,
— Gunnar




Gunnar Bråding
 

Ahhh... Thanks! Then I don’t  need to feel too stupid for not understanding it. 😀

Cheers,
-- Gunnar


On 15 Apr 2021, at 15:29, Erwan Gouriou <erwan.gouriou@...> wrote:


Hi Gunnar,

Unfortunately, we miss code for PLL2 configuration as PLL input.
Though, I'm adding Attie who investigated that point and may have code to get it working.

BR
Erwan

On Thu, 15 Apr 2021 at 10:51, Gunnar Bråding <gunnar@...> wrote:
Hi!

I got a board with the crystal at 25MHz, and need to use the PLL2 as input to the system clock.
I just do not seem to understand the code enough to see how to set the prediv and multiplication for the PLL2
I can choose PLL2 as input to the PLL, and PLL as input to the system clock, but how do set the parameters for PLL2?

Any pointers would be very much appreciated.

Cheers,
— Gunnar





Erwan Gouriou
 

Hi Gunnar,

Unfortunately, we miss code for PLL2 configuration as PLL input.
Though, I'm adding Attie who investigated that point and may have code to get it working.

BR
Erwan

On Thu, 15 Apr 2021 at 10:51, Gunnar Bråding <gunnar@...> wrote:
Hi!

I got a board with the crystal at 25MHz, and need to use the PLL2 as input to the system clock.
I just do not seem to understand the code enough to see how to set the prediv and multiplication for the PLL2
I can choose PLL2 as input to the PLL, and PLL as input to the system clock, but how do set the parameters for PLL2?

Any pointers would be very much appreciated.

Cheers,
— Gunnar





Gunnar Bråding
 

Hi!

I got a board with the crystal at 25MHz, and need to use the PLL2 as input to the system clock.
I just do not seem to understand the code enough to see how to set the prediv and multiplication for the PLL2
I can choose PLL2 as input to the PLL, and PLL as input to the system clock, but how do set the parameters for PLL2?

Any pointers would be very much appreciated.

Cheers,
— Gunnar