Skip to main content
O.Elsherif
Associate
April 18, 2021
Solved

How to change the (STLINK_V3E) MCO HSE Frequency

  • April 18, 2021
  • 9 replies
  • 7935 views

That is the ST-link V3 on NUCLEO-H755ZI board.

The HSE MCO option is set to HSE/3, how to change it to HSE/5.

Usually this is configurable in code, but this is ST-link firmware. If there is a way to change the division value, please some one let me know.

Best answer by S C

Hello,

Sorry for having missed this topic. The ability to change the MCO source on STLINK-V3E boards has been added in response to another topic: ST-LINK provides 8.08 MHz instead of 8.000 on new ... - Page 3 - STMicroelectronics Community. It has been documented in RN0093 rev23 (11 may 20) and remains in the history of more recent versions. The impact on all other boards UM has been missed, concerning the UM2408 it's all the more a pity as it has been updated afterwards for other things (23 march 21) ...
Technically at that time the aim of the change was to increase the accuracy of the clock, and it has been decided (mainly for graphical interface simplification reason), to provide only a single value based on the HSE, close to the initial 8MHz, and hoping that an additional factor of 24/25 in the PLL could address most cases. We also decided to change the oscillator of the STLINK-V3EC boards back to 24MHz to fix the issue on future boards.
For this case especially, I think we will add the HSE/5 selection in STLink-Upgrade applications. I'm wondering also about the HSE/4 which could also allow other "high" frequency multiples.

9 replies

Vangelis Fortounas
Associate II
April 18, 2021

Hello

MCO clock from STLink is 8MHZ and can't be changed. Is connected to MCU's OSC_IN pin. ( HSE input)

Do you mean some other Divider PLL1 -PLL3 ?

Tesla DeLorean
Guru
April 18, 2021

ST-Link/V3 doesn't clock at 8 MHz

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
O.Elsherif
Associate
April 19, 2021

Here it is.

0693W00000900ayQAA.pngI would like to get some thing accurate that could be multiplied to get 480MHz.

The PLL allows maximum multiplication of 512, which should produce (in my case) 960MHz, after that there is a /2 divider.

A PLL pre-division also exist.

DIVM1: / (1-63).

DIVN1: x (4-512).

DIVP1: / (2-128), with increments of 2.

0693W00000900bwQAA.png

Vangelis Fortounas
Associate II
April 20, 2021

Hello

I ignored this picture with STlink Upgrade MCO freq. Also user manual needs an update.

I think is not possible to take 480 from 8.333 with the existing limitations of PLL1. If DIVM1 is 5, 420 and less is ok if DIVM1 is 3 => 475 , 450, ... etc is ok.

If onboard X2 crystal is present , consider use it .

0693W00000ALyPSQA1.jpg 

Piranha
Principal III
September 14, 2023

More than 4 years after ST-LINK V3 based boards came out and more than 2 years after this topic was created - of course it's too soon to ask for a correctly updated documentation from this company... Also the new forum has no ability for other users to add tags to the topic and therefore report issues. And on top of that many of the necessary tags have been removed at all (even for the topic author), including the "Bug-report" and "Documentation" in many forum sub-directories.

@Imen.D , @Peter BENSCH , excellent job, ST!

O.Elsherif
Associate
April 20, 2021

The STLINK-V3 chip is STM32F723IE, and by referring to the (MB1363-H755ZIQ-D01_Schematic) sheet 9 (also page 9) which contains (STLINK_V3E), it shows:

0693W00000AM2zUQAT.png 

By further referring to the datasheet (page 76), it shows:

0693W00000AM2zAQAT.png 

Now, by looking at page 144 in the Reference Manual we see the prescaler setting in the RCC->CFGR register:

0693W00000AM2zFQAT.png 

I need to change this setting (from 3) to (2, 5, or 0 if possible for 25MHz), we should find a way to do this, maybe ST should allow this in the future firmware update, but also if someone knows a way to do this please tell me.

O.Elsherif
Associate
April 23, 2021

Actually, I figured out that using the fractional part of the PLL could achieve a good result.

Using the following configuration:

DIVM1: 3

DIVN1: 345

FRACN1: 4915

DIVP1: 2

The equation is: input_frequency / DIVM1 * (DIVN1 + FRACN1 / 2^13) / DIVP1

This would lead to about: 479.99996609

With a difference about: 0.0000339 Hz (%0.0000000706)

I think this would be acceptable.

Uwe Bonnes
Chief
April 23, 2021

However there is no public way to set these parameters in the STLINK Api that I know of.

Associate III
October 30, 2021

-

S C
S CBest answer
ST Employee
September 18, 2023

Hello,

Sorry for having missed this topic. The ability to change the MCO source on STLINK-V3E boards has been added in response to another topic: ST-LINK provides 8.08 MHz instead of 8.000 on new ... - Page 3 - STMicroelectronics Community. It has been documented in RN0093 rev23 (11 may 20) and remains in the history of more recent versions. The impact on all other boards UM has been missed, concerning the UM2408 it's all the more a pity as it has been updated afterwards for other things (23 march 21) ...
Technically at that time the aim of the change was to increase the accuracy of the clock, and it has been decided (mainly for graphical interface simplification reason), to provide only a single value based on the HSE, close to the initial 8MHz, and hoping that an additional factor of 24/25 in the PLL could address most cases. We also decided to change the oscillator of the STLINK-V3EC boards back to 24MHz to fix the issue on future boards.
For this case especially, I think we will add the HSE/5 selection in STLink-Upgrade applications. I'm wondering also about the HSE/4 which could also allow other "high" frequency multiples.

Piranha
Principal III
September 23, 2023

For this case especially, I think we will add the HSE/5 selection in STLink-Upgrade applications. I'm wondering also about the HSE/4 which could also allow other "high" frequency multiples.


Just put there a combo box with all (1..5) MCO divider values.

@Amel NASRI , why did you selected this post as a "solution", while the actual issue (fixing the documentation) has not been done? The post even explicitly emphasizes it:

The impact on all other boards UM has been missed, concerning the UM2408 it's all the more a pity as it has been updated afterwards for other things (23 march 21) ...

Amel NASRI
Technical Moderator
September 26, 2023

Hi @Piranha ,

I selected the post of @S C as a solution because I assess that it answers the initial question.

I'm sure that the documentation & tool enhancements will be handled properly by @S C and they raised as results of this discussion.

-Amel 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
ASche.5
Associate III
August 1, 2024

I am confused how can this be done and changed in the V3 on Nucelo board that do not have a 8MHz base is there only the firmware update tool ? What else I just started with STM32H7 that has 25MHz base clock and I measure regardless of the settings in the firmwar tool som 17.somthing MHz at SB72 this is a MESS. Please can some one explain what is going on??!? 

S C
ST Employee
August 5, 2024

Hello,

Initially boards have been produced with a single MCO output value: 8MHz, generated from the internal HSI of the STM32F723. Afterwards, several versions of ST-Link firmware have been published to extend this behavior; the last modification is available since V3J14M5 and allows several derivative values from the ST-Link 25MHz HSE additionally to the 8MHz HSI (selection is possible during the ST-Link firmware update). Concerning your point regarding SB72, please precise the board references and please also double check with the most recent ST-Link firmware version (STSW-LINK007 - ST-LINK, ST-LINK/V2, ST-LINK/V2-1, STLINK-V3 boards firmware upgrade - STMicroelectronics). If you changed something regarding SB configuration since board out of the box, please double check that the MCO from ST-Link is not conflicting with another feature. You might also check against a possible conflict with the running application

ASche.5
Associate III
August 6, 2024

Thanks for the hints and summery of the HSE options on the nucleo board. The problem that I faced was that I measured something obscure like 6-7MHz on the SB72 jumper. But after updating the ST-Link again I had 8MHz clock but a jitterd  one, this was one the  HSI of the F733. Now on the HSE the 8.33 are stable enogh but force me to have fracrtions in the PLL of the STM32H7. I guess its fine for the moment and I will upgrade my nucleo to have a HSE crystal in future.