Question
__ADCX_FORCE_RESET() not seen
Posted on August 03, 2015 at 16:58
I am using the version 1.3.1. of stm32f4xx hal drivers. I am using the 3 ADCs. ADC1 and ADC2 in dual mode DMA interrupt driven and ADC3 regular conversion.
As you can in the code below I am using the functions __ADCx_FORCE_RESET() (x= 1, 2, and 3) . I dont understand why but the functions don't link. I get undefined symbol. I must use __ADC_FORCE_RESET() to get it work but it will reset all ADCs which I don't want. Any ideas why? Thank youvoid HAL_ADC_MspDeInit(ADC_HandleTypeDef* hadc)
{
if(hadc->Instance == ADC1)
{
/*##-1- Reset peripherals ##################################################*/
__ADC1_FORCE_RESET();
__ADC1_RELEASE_RESET();
/*##-2- Disable peripherals and GPIO Clocks ################################*/
HAL_GPIO_DeInit(GPIOC, GPIO_PIN_3);
/*##-3- Disable the DMA Streams ############################################*/
HAL_DMA_DeInit(&hDMA2_ADC);
/*##-4- Disable the NVIC for DMA ###########################################*/
HAL_NVIC_DisableIRQ(DMA2_Stream0_IRQn);
}
if(hadc->Instance == ADC2)
{
/*##-1- Reset peripherals ##################################################*/
__ADC2_FORCE_RESET();
__ADC2_RELEASE_RESET();
}
if(hadc->Instance == ADC3)
{
/*##-1- Reset peripherals ##################################################*/
__ADC3_FORCE_RESET();
__ADC3_RELEASE_RESET();
/*##-2- Disable peripherals and GPIO Clocks ################################*/
HAL_GPIO_DeInit(GPIOF, GPIO_PIN_7);
}
}