STM32H755ZIQ ADC to DMA Failure
Hello!
I am trying to trigger an ADC sample to write to DMA via a timer and trigger a green LED on PB0 after every sample so I can use an oscilloscope to verify the sampling speed. However, I believe after trying to debug as best I can, I do not have the correct configuration for the ADC or there is a problem with the DMA requests. I have included all of the user code that I have placed inside the main.c file at the bottom of this post. I have also included a photo of my ADC settings. I wasn't able to include it but I have enabled the NVIC interrupts by clicking the check boxes.
I can successfully build and flash the code to the device, that is the code I shared. I do not get back any errors during building, its just the LED doesn't flash.
I have ensured the LED is working by just placing a simple toggle code in the while statement and running that.
#define BUFFER_SIZE 2
/* USER CODE BEGIN 2 */
HAL_ADCEx_Calibration_Start(&hadc1, ADC_CALIB_OFFSET_LINEARITY, ADC_SINGLE_ENDED);
HAL_ADC_Start_DMA(&hadc1, (uint32_t*)adc_buffer, BUFFER_SIZE);
HAL_TIM_Base_Start(&htim1);
/* USER CODE END 2 */
/* USER CODE BEGIN 4 */
void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc)
{
HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_0);
}
/* USER CODE END 4 */
//I have also debugged with the following code in the While Statement
if (adc_buffer[0] > 0)
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_0, GPIO_PIN_SET);Thank you for your help!
