2023-06-03 04:17 AM - edited 2023-11-20 04:04 AM
I wanted to know how to configure the ioc setting for dual regular simultaneous mode. I want to use ADC1 and ADC2 together. After the correct ioc setting, how to know to code for this mode. I took help of the available resources but getting an error in
void PeriphCommonClock_Config(void)
{
RCC_PeriphCLKInitTypeDef PeriphClkInit = {0};
/** Initializes the peripherals clock
*/
PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_ADC;
PeriphClkInit.AdcClockSelection = RCC_ADCCLKSOURCE_PLLSAI1;
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK)
{
Error_Handler();
}
}
When I run the code in debug mode it goes in this error handler. I am not able to figure out why this is happening.