cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE 1.9 HAL fails to enable ADC in stm32H743vit6 revision V

SeyyedMohammad
Senior III

It fails when called by `HAL_ADC_Start_DMA(&hadc2, &ADCbuf[0], 1)` exact position is at stm32h7xx_hal_adc.c `ADC_Enable()` depicted in the picture below.0693W00000Lz54JQAR.png I have no idea why this happening. Called by itself an internal error!

And complete project has been attached.

And pcb layout:

0693W00000Lz5Q5QAJ.png

16 REPLIES 16
SeyyedMohammad
Senior III

It seems we have hardware bug mentioned here:

stm32 - STM32H7 ADC Baremetal - ADC not ready - ADC no conversion - Electrical Engineering Stack Exchange

I will test ans report. Test report:

CubeIDE does not generate hadc2.Init.ClockPrescaler= .

Then I've added folloing line to `MX_ADC_Init()` function before `HAL_ADC_Init(&hadc2)`:

hadc2.Init.ClockPrescaler=ADC_CLOCK_SYNC_PCLK_DIV4;

And all ASYNC prescaler prevent ADC for being enabled.

And the ADC got started, but why?

Could some employee please report this bug?

Sorry. Revision Y. (stepping is the Intel word for this. worked with Intel chips too long ..)

Pavel A.
Evangelist III

> CubeIDE does not generate hadc2.Init.ClockPrescaler

What is your CubeIDE version?

I cannot confirm this with v 1.7.0. Created a project for Nucleo H743-ZI2 with ADC1 and ADC2;

For both instances hadcN.Init.ClockPrescaler is generated.

But the Cube allows to select only async prescalers. All sync prescalers are greyed out and not available.

Version is 1.9. I've downloaded and installed it, own. Since there is no prescaler generation it uses it's default, which is asynchro with no divider. And the ADCSEL (asynchro clock source MUX, this is grates out and unchangeable) has it's default pll2p. ADC doesn't start but changing it from it's default will work!

Why the default doesn't?!​

I've also tested h743zitx and h750vbtx adc clock configuration for both of them was also gray (after enabling arbitrary ADC channel). Is there some swing that I have missed?​ Wierd doesn't it? I think not, because USB I2S sai uart has been tested and their clock tree ihas become active. How this huge bug has been let to be releasing. It seems we will see version 1.9.1 soon! At least I hope.

same for 747XI. Bug in CubeMX.