cancel
Showing results for 
Search instead for 
Did you mean: 

Create external signal with clock 100 Mhz in STM32H745

Ronil
Associate II

Hi all, I have already searched on the forms and in general did not find an answer to my problem, I will be very grateful to you for help.
I need to create an output signal with a frequency of 100 Mhz as CLK in  STM32H745. I used the Discovery Boards (STM32H745I-DISCO STM32H750B-DK) for the test. 

 

1. I used timers with PWM and adjusted the ABM timer clock for 220 MHz, set up pre-scaler and counter period

img_1.bmp 

But I achieve only 50 Mhz a clock as a maximum, with settings for 100 Mhz there is nothing at the output for CLK. To detect the clock I use PicOscope6404D (Bandwidth 500 Mhz).

 

2. I used as output ch A8 and adjusted A8 for  RCC_MCO_1

I used the next settings but received the same result as for Timers not more than 50 MHz. Can you explain why I have this limitation (because the device settings show me that I can reach 100 Mhz but in real not )?

img_1.bmp

 

3. Finally I used the PA8  HRTIM_CHB2 timer and received high and very unstable frequency with very low amplitude. Do you how I can make a stable frequency and increase amplitude from HRTIM_CHB2?

20 REPLIES 20

@Ronil wrote:

Probably I solved the problem! thank you all!


You need to tell how you solved the issue and if one of the comments above answered your question, please mark it as Accept as solution.

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.

 

HAL_RCC_MCOConfig(RCC_MCO1, RCC_MCO1SOURCE_SYSCLK, RCC_MCODIV_1);

replace to

HAL_RCC_MCOConfig(RCC_MCO1, RCC_MCO1SOURCE_PLL1QCLK, RCC_MCODIV_5);

 

 

but timers still don't work for 100 Mhz

I seen this a few times, when OP could set his own responce as "solution".

Quite illogical to me, do Moderators of the forum aware?

but what a problem is here? I can remove that as and question if you care about that, it was my my first question in STM 

Problem with statistic, in another thread OP post a question and provide responce in second post, than mark as solution. There was no other participants, so he can drive his rating up.

 In this thread it make more sence to  mark other person responce as a solution even its not correct answer but just lead you to think in "right direction".

 In general, I think its reasonably to block OP in selection own resonce as solution

I guess it's worth it, I'm surprised there's a rating here

BarryWhit
Senior III

If someone provided the critical advice, or just gave you a serious nudge in the right direction, the polite thing is to thank them by accepting their answer. It's fine to accept your own solution if you found it on your own. 

 

It's not just the bandwidth of your scope that determines the measurement bandwidth, but also the bandwidth of your probes. Good quality 10x passive probes should handle a 100Mhz sine wave.

 

- If someone's post helped resolve your issue, please thank them by clicking "Accept as Solution".
- Once you've solved your issue, please post an update with any further details.

I only wonder why my amplitude is only 1 V, can I control the value of the amplitude of the signal?

I used and another scale but result the same

__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE0);  

from RCC_MCO_1? ?amplitide.jpg

BarryWhit
Senior III

Voltage scaling is unrelated to the amplitude of the crystal oscillator's output signal.  

 

It's normal for the clock oscillator circuit itself (i.e. the chip's XTAL pins) to stabilize at this kind of amplitude. I'm not sure if the MCO output is supposed to be a buffered copy of the signal at the XTAL pins or a proper digital signal (but I note that the scope shows it looks like an analog sine wave). I'm not aware of any way to control the oscillator circuit's steady-state amplitude (It's the combined result of design choices by ST and the crystal used). 

 

If you need a logic signal, you can try PWM with the GPIO pin set to a higher speed.

- If someone's post helped resolve your issue, please thank them by clicking "Accept as Solution".
- Once you've solved your issue, please post an update with any further details.

Thank you

Do you mean to use PWM without a timer directly via GPIO?

Because PWM with Timer can create about 20 Mhz, but cant 100 Mhz