STM32CubeF1 icon indicating copy to clipboard operation
STM32CubeF1 copied to clipboard

Bad modification in stm32f1xx_hal_adc_ex.c

Open CanastraRF opened this issue 4 years ago • 1 comments

In the newest version of stm32f1xx_hal_adc_ex.c in function

HAL_ADCEx_MultiModeStart_DMA() HAL_ADCEx_MultiModeStop_DMA() HAL_ADCEx_MultiModeConfigChannel()

ADC_HandleTypeDef tmphadcSlave={0}; is added. This create a const in flash of ADC_HandleTypeDef and copy this to stack. A better solution is somthing like memset(&tmphadcSlave, 0, sizeof(tmphadcSlave))

Improvment: No const in flash,

CanastraRF avatar Aug 01 '21 19:08 CanastraRF

ST Internal Reference: 112128

ASELSTM avatar Aug 20 '21 10:08 ASELSTM

Hi @CanastraRF,

Our development team has unfortunately declined your proposal. According to them, the use of memset() would imply the use of C library within the HAL/LL drivers, which is not thread safe.

Please allow me thus to close this thread. Thank you for your comprehension.

With regards,

ASELSTM avatar Apr 07 '23 11:04 ASELSTM