cancel
Showing results for 
Search instead for 
Did you mean: 

H5 ADC clock

MikeInMinnesota
Associate

Hi, I'm using the Cube IDE 1.17 on an H5.  The HCLK is 248MHz.  When I try to configure the ADC/DAC clock to use HCLK, I get a red error.  According to the data sheet, the maximum clock to the ADC is 75MHz.  I am configuring the clock as divide by 6.

Am I misunderstanding the maximum ADC clock rate in the datasheet?  The part should be able to perform 5 MSPS.

Regards,

Mike 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @MikeInMinnesota 

Please refer to the datasheet:

SofLit_0-1739455791646.png

At System clock of 248Mhz you are at VOS0. fADC ker clock should not exceed 125Mhz.

This is already shown by the message in CubeMx:

SofLit_1-1739455897852.png

You can use PLL2 for the ADC kernel clock to not exceed 125Mhz at VOS0:

Example of ADC ker clk = 108Mhz keeping the system clock at 248Mhz.

SofLit_2-1739456135848.png

Hope that answers your question.

 

 

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.
PS:
1 - This is NOT an online support (https://ols.st.com) but a collaborative space.
2 - Please be polite in your reply. Otherwise, it will be reported as inappropriate and you will be permanently blacklisted from my help.

View solution in original post

6 REPLIES 6
TDK
Guru

There are limits on  f_adc_ker_ck_input, which is the clock fed to the ADC before it is divided down. The limit varies by part and by run mode.

TDK_0-1739396355092.png

 

There are additional limits on f_adc_ker_ck, which is the clock after it's been divided down.

TDK_1-1739396387963.png

 

If you feel a post has answered your question, please click "Accept as Solution".
AScha.3
Chief III

Hi,

so choose a somewhat lower clock... (that can work on AHB bus)

AScha3_0-1739396552009.png

+ the "red error" telling you, whats wrong (just go with mouse pointer at it).

If you clock it at 75M , it can reach 5 Msps / 12 bit. (with minimum sampling time)

But be aware: it needs low impedance driving the input then:

AScha3_1-1739396884381.png

 

If you feel a post has answered your question, please click "Accept as Solution".
MikeInMinnesota
Associate

Hi, thanks for all the advice.

The part is an STM32H523CC.

The ADC portion of the clock tree is:

MikeInMinnesota_0-1739453308116.png

Hovering doesn't display any error message.

The main setup for the APBs is:

MikeInMinnesota_1-1739453386928.png

That's selecting HSI, PLLM/4, N=X31, P=/2 and PLL1P to SYSCLK

The ADC itself is independent, with no injected channels.  The HCLK is divided by 6 for the ADC, and sampling is 6.5+2.5=9 clocks.  That's a little under 5 MSPS.

Would I be better off using PLL2R to bring in the ADC clock, already divided by 6?

Hello @MikeInMinnesota 

Please refer to the datasheet:

SofLit_0-1739455791646.png

At System clock of 248Mhz you are at VOS0. fADC ker clock should not exceed 125Mhz.

This is already shown by the message in CubeMx:

SofLit_1-1739455897852.png

You can use PLL2 for the ADC kernel clock to not exceed 125Mhz at VOS0:

Example of ADC ker clk = 108Mhz keeping the system clock at 248Mhz.

SofLit_2-1739456135848.png

Hope that answers your question.

 

 

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.
PS:
1 - This is NOT an online support (https://ols.st.com) but a collaborative space.
2 - Please be polite in your reply. Otherwise, it will be reported as inappropriate and you will be permanently blacklisted from my help.

> Would I be better off using PLL2R to bring in the ADC clock, already divided by 6?

Yes. That fixes the restriction on f_adc_ker_ck_input. Assuming f_adc_ker_ck can be 75 MHz at your run mode, it will work.

If you feel a post has answered your question, please click "Accept as Solution".
MikeInMinnesota
Associate

Hi, SofLit and TDK - thanks, that resolves it.

The bug in the CubeIDE is if the clock tree is reloaded then the error message of needing to be less than 125MHz does not display.  That's with version 1.17.

I guess was confused by the adc_ker_ck restriction to 125MHz and what clock was selected.  I thought by selecting HCLK in the CubeIDE then I'd get adc_hclk instead of adc_ker_ck_input.  Using adc_ker_ck_input means I should set CKMODE to 0 instead of adc_hclk/1.

Regards,

Mike