This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software:
Hello TI,
I configure the ADC0 for 5 different channels (for different pin) , and I got the example code for single channel ADC with DMA , but now we are trying to get all 5 ADC channel data from DMA but as I try the same we are getting garbage value ,
I found the below example code on the e2e which is similar as my counsion , but in that there two ADC (adc0 and adc1 is used ) instead of adc0 or adc1 for to different channels,
Can you please tell whether it is possible ? then please provide me the example code for the same,
whether it is possible to configure multiple ADC0 channel with single DMA ?
if not then please tell me how to configure multiple DMA with ADC0 with 5 different channels ?
best regard's
Hello ,
Thank you for replay .
I want the ADC1 in following manner, as I did not get the proper idea from Image , so I also texting the same,
I am using ADC1 with its 5 different channel and all channel are using different memory address (In that i am not using an ADC Interrupts) so directly reading the RAW data from following function
Mosfet_Temp = DL_ADC12_getMemResult(ADC_INST, DL_ADC12_MEM_IDX_0); //PA15
Mosfet_Temp1 = DL_ADC12_getMemResult(ADC_INST, DL_ADC12_MEM_IDX_1); //PA16
Trans_Temp = DL_ADC12_getMemResult(ADC_INST, DL_ADC12_MEM_IDX_2); //PA17
Diode_Temp = DL_ADC12_getMemResult(ADC_INST, DL_ADC12_MEM_IDX_3); //PA18
Mains_Sense = DL_ADC12_getMemResult(ADC_INST, DL_ADC12_MEM_IDX_4); //PB17
Now I want to get the ADC raw data from DMA via Circular mode , in such manner data should not be corrupt by other ADC data , Plesare share the example code for the same , it is very new to me to configure the same ,
Best regards,
or In short , we are trying the same with ADC , as we have did in ST , You can see we are using 5 channel of ADC and collecting the data from preph to memory as shown .
thanks
Hi,
Get it. I will take a look into it and give you feedback soon.
Best regards,
Cash Hao
Hi,
Sorry for the late update.
I have build this project with single DMA for 5 channels of ADC0. Please check if it can meet your requirement.
adc12_max_freq_dma_LP_MSPM0G3507_nortos_ticlang.zip
Best regards,
Cash Hao
Hello , Thank you for replay ,
I go through it and I also try same setting, but the problem i am facing in application code , how to get the these 5 Channel ADC raw value in a array index( means at 0 index = ADC channel 0 raw , 1 = ADC channel 1 raw value -- LIKEWISE) through DMA , Could you please told how Can I do that , the function of DL is very new to me .
Best regards,
Hi,
I am not sure what do you mean by this "at 0 index = ADC channel 0 raw , 1 = ADC channel 1 raw value -- LIKEWISE"
It look like you are looking for this kind of result.
Best regards,
Cash Hao
Hello ,
Can describe it how it working , if it is similar as 5 ADC Channel with 5 different DMA Channel then it will work fine for me ,
Please share example code code.
And I was saying ,
I have array ,
adc_raw[5];
and I want the adc raw values of 5 different channel at each array index,
(ex - adc_raw[0] = ACD_channel_0)
Best regards,
Hi,
Yes, for this kind of result, 5different DMA channel will be required for 5 ADC channels.
Best regards,
Cash Hao
Hi,
Please refer to this one. I have use one DMA for one ADC channel. You can modify it for 5 DMA for 5 ADC channel based on it.
adc12_single_conversion_LP_MSPM0G3507_nortos_ticlang.zip
Best regards,
Cash Hao