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]; }
[SOLVED]
I change array to voalatile and important point is i foget for setting channel in "Parameter Settings" for ADC in CubeMX. where is default configuration is direct to channel 1. after channel have configured and my code is work now. thank's