2021-07-05 02:22 AM
Board : STM32F746g disco
I configure ADC1 with DMA2 Stream4
My LCD configured in DMA2 Stream 0
Both are having the same DMA Channel 0. Is it okay or not. any conflict are there for this configuration. Because i did not get any output from both ADC and LCD side. Can i use DMA_CHANNEL_0 both cases ?.
ADC1:
hdma_adc1.Instance = DMA2_Stream4;
hdma_adc1.Init.Channel = DMA_CHANNEL_0;
LCD :
DmaHandle.Instance = DMA2_Stream0;
DmaHandle.Init.Channel = DMA_CHANNEL_0;
Thanks
Manikandan
2021-07-05 05:19 AM
> Both are having the same DMA Channel 0. Is it okay or not.
"Channel" in the DMA in 'F7 is just another name for "trigger source selection". So one Stream's Cannel selection does not influence other streams in any way.
Your problem will be elsewhere. Do the DMA work individually? Don't you overload the system, leading e.g. to overruns in ADC?
JW
2021-07-05 09:50 PM
Thank you @Community member
I checked the DMA individually, it is working fine. But now i am using FreeRTOS for read the ADC value and LCD display checking. I create some Testing task for FreeRTOS, the testing tasks are working fine. I want to check ADC with DMA using FreeRTOS. Can you Suggest any document or video or any link for ADC with DMA using FreeRTOS concept. I am struggled in this task, give me some solution.
Thanks
Manikandan
2021-07-05 10:43 PM
Maybe you are simply exhausting the system resources, for which there is no solution except radical redesign.
JW
2021-07-05 10:50 PM
Hai @Community member
I can not understand your answer, can you explain clearly. Because i am a beginner of this FreeRTOS concept.
Thanks
Manikandan
2021-07-06 08:01 AM
Maybe you attempt to do too many things, and the mcu can't do that. For example, high volume LTDC traffic, plus high ADC sampling frequency may result in buses to be clogged, resulting in ADC overflow and whatever follows from that (see ADC overflow description in datasheet).
JW
2021-07-06 05:57 PM
You're unlikely to get tutorials here, people have their own commitments/jobs.
Perhaps if the system is choking you should look at the rate you have the ADC running. In most cases you'll want to pace them with a TIM rather than run the ADC into saturation
2021-07-06 10:35 PM
hello @Community member
Thank you for your answers
2021-07-06 10:44 PM
Here i Attached my main.c file for your reference. I create two FreeRTOS tasks. One for ADC and another one for Display. Both tasks working fine when i am using ADC polling method, because in polling method no use of Callback function. But i ADC_DMA concept callback function also there, i don't know how to handle this type tasks. Now first i start ADC_Check task , then callback function called. After that nothing will be printed. I am using some function for printing adc value.