2024-11-14 1:46 AM
Hi.. Can anyone tell me why the ADC Calibration value is not the same before and after I initialize the DAC
It seems that the value maxes out if I calibrate after I have initialized the DAC.
The calibration register is 7 bits.
The ADC also measures incorrectly if I calibrate the ADC after I have initialized the DAC.
Anyone have a good explanation?
thanks in advance.
2024-11-14 4:24 AM
The problem is that MX_DAC1_Init() sets up the Clock again even though PeriphCommonClock_Config() has set it up correctly.
When MX_DAC1_Init() it sets it up to use RCC_ADCDACCLKSOURCE_HCLK and that's wrong!!!!
so it seems as if there is an error in cubeMX when using both ADC and DAC at the same time.
Can be solved by removing : HAL_RCCEx_PeriphCLKConfig() in HAL_DAC_MspInit();
2024-11-14 5:13 AM
Hi @spa23 ,
Interesting case to check on our side.
Could you please precise the used part number?
-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.
2024-11-19 2:41 AM
Part number : STM32H573IIKXQ
2024-11-21 5:49 AM
Hi @spa23 ,
Back again to this topic.
I made some tests using STM32H563 and I'm getting the same calibration value before initializing DAC and after it.
I changed clock configurations without any impact.
I don't see clock set with RCC_ADCDACCLKSOURCE_HCLK on DAC initialization.
At this level, may you:
- 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.
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.