I can measure signals and write in memory with DMA but speed is too slow (60 KSPS) while the ADC clock (same as system clock) is at 16 MHz.. I measure the speed but measuring a square signal at the ADC input.
I use a vary basic code with HAL easy to find on the internet but doesn't work for me !
Could someone give a code that you're sure it works so I can compare it to mine please ?
Thank you !
*/
int main(void) {
HAL_Init();
SystemClock_Config();
/* USER CODE BEGIN SysInit */
stop = 0;
i = 0;
a = 0;
MX_USART2_UART_Init();
MX_ADC1_Init();
MX_DMA_Init();
MX_ADC2_Init();
MX_GPIO_Init();
/* USER CODE BEGIN 2 */
HAL_ADCEx_Calibration_Start(&hadc1, adcVal);
//HAL_ADC_Start_IT(&hadc1);
HAL_ADC_Start_DMA (&hadc1, (uint32_t*)adcVal, 100);
while (1)
{
}
}