cancel
Showing results for 
Search instead for 
Did you mean: 

Series of measurements with ADC and DMA on STM32H743

DBrau.2
Associate III

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.

5 REPLIES 5
Javier1
Principal

Could you post the CubeMx file?

Also show me how ccd is declared

we dont need to firmware by ourselves, lets talk
DBrau.2
Associate III

#define NUM_PIX 3700

uint16_t ccd[NUM_PIX];

It's declared as global variable.

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.

TDK
Guru

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".

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)

we dont need to firmware by ourselves, lets talk