This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

CubeMX - Multiple Channel ADC+DMA

I Can't found reference for read all substract of array in MDK V5, where is the code generate from CubeMX it's activate adc1, adc2, adc3, adc5, adc6,& adc7. can any one help me ?


  uint8_t ADC_buffer[6];

  HAL_Init();
  SystemClock_Config();
  MX_GPIO_Init();
  MX_DMA_Init();
  MX_ADC1_Init();
  MX_USART1_UART_Init();

  HAL_ADC_Start_DMA(&hadc1, (uint32_t *)ADC_buffer, 6);

  while (1)
  {
        A1=ADC_buffer[0];
        A2=ADC_buffer[1];
        A3=ADC_buffer[2];
        A5=ADC_buffer[3];
        A6=ADC_buffer[4];
        A7=ADC_buffer[5];
   }