Hi all, im using STM37H74x evaluation board and i managed to get most of it working (PWM, DAC etc..)
but when i try using the ADC i get strange input, putting the configuration aside, this is what my main looks like below.
im using ADC1 ch6, according to the reference manual in order to use this output i had to change SB
so that SB37 is on and SB38 is off , if i did understand that correctly.

my output did not seem to mind the pin input and just constantly showed a random value that was between 8000 and 11000
note that the ADC is 16bit. and that i have tried the same method on differently channels and ADCs on the MCU.
What am i missing?
this is my main:
int main(void)
{
printf("***********************\n");
printf("started: Ver: %.2f\n",VERSION);
printf("***********************\n\n");
HAL_Init();
SystemClock_Config();
PeriphCommonClock_Config();
MX_USART3_UART_Init();
MX_USB_OTG_FS_PCD_Init();
MX_ADC1_Init();
MX_ADC2_Init();
MX_ADC3_Init();
MX_FDCAN1_Init();
MX_I2C2_Init();
MX_SPI4_Init();
MX_TIM2_Init();
MX_TIM4_Init();
MX_TIM15_Init();
MX_TIM17_Init();
MX_DAC1_Init();
MX_USART1_UART_Init();
MX_USART2_UART_Init();
/* USER CODE BEGIN 2 */
HAL_TIM_Base_Start(&htim2);
HAL_TIM_Base_Start(&htim4);
HAL_DAC_Start(&hdac1, DAC_CHANNEL_1);
dac_out(1.1); //accepts V as input
//start_plan(1);
int adc_i;
int raw;
while(1)
{
//adc
//printf("%d\n",read_ADC());
HAL_ADC_Start(&hadc1);
HAL_ADC_PollForConversion(&hadc1, HAL_MAX_DELAY);
raw = HAL_ADC_GetValue(&hadc1);
printf("adc: %d\n",raw);
//delay
HAL_Delay(1);
}
}