Skip to main content
DBrau.2
Associate III
September 10, 2021
Question

Series of measurements with ADC and DMA on STM32H743

  • September 10, 2021
  • 5 replies
  • 2483 views

Hi.

Can you tell me, why I don't get interrupt from completed measure of ADC.

I need to make 200 measeurements using DMA. I have configured settings in CubeMX. You can find them on the screenshot and the part of the code where I run and call it. The line startinf reading ADC is called but then it still waiting for measure and don't receive interrupt.

This topic has been closed for replies.

5 replies

Javier1
Principal
September 10, 2021

Could you post the CubeMx file?

Also show me how ccd is declared

hit me up in https://www.linkedin.com/in/javiermuñoz/
DBrau.2
DBrau.2Author
Associate III
September 10, 2021

#define NUM_PIX 3700

uint16_t ccd[NUM_PIX];

It's declared as global variable.

DBrau.2
DBrau.2Author
Associate III
September 10, 2021

I see in this file that I've set circular in DMA settings and DMA One Shot Mode in Parameter Settings what doesn't make sense, but I've also checked other settings of that.

Javier1
Principal
September 13, 2021

HAL_ADC_Start_DMA is expecting ccd to be a uint32_t array so maybe try change that

HAL_StatusTypeDef 	HAL_ADC_Start_DMA (ADC_HandleTypeDef *hadc, uint32_t *pData, uint32_t Length)

hit me up in https://www.linkedin.com/in/javiermuñoz/
TDK
September 10, 2021

Monitor the return value from HAL_*. Possibly the peripheral is still busy with the last call.

"If you feel a post has answered your question, please click ""Accept as Solution""."