Skip to main content
Associate
February 1, 2024
Solved

ADC peripheral clock configuration

  • February 1, 2024
  • 2 replies
  • 3158 views

I am using STM32F429VIT6. Configured SystemCoreClock 168MHz and APB2 clock is 84MHz. I accidentally configured ADC peripheral with "ADC_CommonInitStructure.ADC_Prescaler = ADC_Prescaler_Div2;" but datasheet says max ADC frequency is 36MHz. I am wondering about my ADC peripheral clock:

- Is it running at 42MHz with overclocking? or

- Is it running with max freq. so it is 36MHz? or

- Is it running with typical freq. so it is 30MHz? or

- Is it ignore ADC_Prescaler_Div2 and process it with ADC_Prescaler_Div4 so it is 21MHz?

Orkun_0-1706784101575.png

 

 

 

This topic has been closed for replies.
Best answer by Sarra.S

Hello @Orkun 

It's generally not recommended to exceed the maximum ratings as specified in the datasheet because it could lead to unpredictable behavior or even damage the peripheral. It's advisable to adjust your clock configuration to ensure that the ADC peripheral is not driven above its maximum rated frequency of 36MHz. We cannot guarantee any values outside our test range.

Hope that helps!

2 replies

Sarra.SAnswer
ST Employee
February 1, 2024

Hello @Orkun 

It's generally not recommended to exceed the maximum ratings as specified in the datasheet because it could lead to unpredictable behavior or even damage the peripheral. It's advisable to adjust your clock configuration to ensure that the ADC peripheral is not driven above its maximum rated frequency of 36MHz. We cannot guarantee any values outside our test range.

Hope that helps!

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.
AScha.3
Super User
February 1, 2024

If you set div2 , it runs at 84/2 = 42 MHz.

Did you use Cube ?

It limits in such case to: hadc1.Init.ClockPrescaler = ADC_CLOCK_SYNC_PCLK_DIV4; (21MHz here ).

You should not "overclocking" , to be sure, tolerances stay at levels, as in datasheet promised.

"If you feel a post has answered your question, please click ""Accept as Solution""."
OrkunAuthor
Associate
February 1, 2024

nope I did not use Cube, also used STD lib. In my example; TIM1 CC4 trigger ADC injected conversions.

Compared DIV2 and DIV4 performance with toggled GPIO. DIV2 seems much faster than DIV4.

How can I detect if it is overclocking or not?

AScha.3
Super User
February 1, 2024

>How can I detect if it is overclocking or not ?

No need to detect, you set the divider - so you know it .

Usually nothing happens , just from 36M to 42M is about 17%  over "allowed" max.

And all cpu and peripherals need to have some safety margin, to be sure (STM) , the chip will work under all bad conditions (+80° around, low or hi supply voltage ) and keep to the promised precision.

 

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