2024-05-09 09:47 AM
2024-05-09 10:04 AM
Hi,
what interrupts are : enable+priority , set in nvic ->
+ callbacks : enable , set in advanced -> right side...
2024-05-10 12:00 AM
Thanks to know that way . But i didnt get well
I need as follows
Am generating PWM using Via DMA array (TIM1 + update Event )
am aslo trigger an ADC via the same TIM1 update event and saving to DMA array by using the following function
HAL_ADC_Start_DMA(&hadc, ADC_RES, 160);
But when using this funtion athe ADC is not generate the interrupt ie ,the void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc)
when i use HAL_ADC_START_IT it will generate ADC interrupt
But not HAL_ADC_Start_DMA().
I want ADC interrupt trigger with each sample of adc HAL_ADC_Start_DMA().
How to achive it ?
2024-05-10 12:56 AM
>I want ADC interrupt trigger with each sample of adc HAL_ADC_Start_DMA().
Why then use DMA ?
And what you wanna do in the int then ?
2024-05-10 01:51 AM
ADC data should save to array by using DMA HAL_ADC_Start_DMA().
and it is working am able to see the data saved in array .
But I need funtion to do whenever each adc samapled .
so I required ADC interrupt .
2024-05-10 03:20 AM
This isnt by design. When you trig ADC by timer use timer int for this . But normal way is ADC DMA half and full int and function do over half buffer stored.
2024-05-10 06:02 AM
Hi Ok
Can i update the ADC interuupt bit likewise as follows
ADC1->CR |= ADC_CR_ADIE;
or like low level access the concerned bit
i am not good programmer sorry for the silly question ?
2024-05-10 09:24 AM
HAL_ADC_Start_IT(&hadc);
HAL_ADC_Start_DMA(&hadc, ADC_RES, 160);
Called HAL_ADC_Start_IT(&hadc);function firstly only for enable the interrupt
HAL_ADC_Start_DMA(&hadc, ADC_RES, 160); and called it
And worked as expected is there any problamatic situation
I called HAL_ADC_Start_IT(&hadc); just for tregger the adc after conversion
is it a correct way ?