Right way to Enable/Disable/Re-enable ADC?
Hello:
There is a significant amount of time between calls to the ADC peripheral and to save power I would like to shut it down. It does not seem the same as setting it up as it has issues running after.
The order it initializes:
MX_ADC1_Init();
HAL_ADCEx_Calibration_Start(&hadc1, ADC_SINGLE_ENDED);
HAL_ADC_Start_DMA(&hadc1, (uint32_t*)adcDMABuffer, DMA_SIZE);
What I am doing to "deinitialize and stop" is the same order going back:
HAL_ADC_Stop_DMA( &hadc1 );
HAL_ADC_Stop( &hadc1 );
HAL_ADC_MspDeInit(&hadc1);
Then, to get it going again, I perform the iinitialize. However, the interrupt does not run/function. Is this not the correct way to accomplish what I am trying to do? It seems not, I am hoping someone could let me know.
Thanks!