cancel
Showing results for 
Search instead for 
Did you mean: 

Seting up ADC in dual mode with DMA - Manual is not satisfying.

Tobe
Senior III

I have some problems getting all the information out of the manual.

Using HAL is no option.

There are a lot of questions (Question are all refering to "Injected simultaneous mode") that cant be answered, or details that are confusing:
- When in Injected simultaneous mode, regular conversions are possible, but use the settings of the common registers for dual settings?
- Picture "say what": It does not really say how it would behave in that case.
- With all the information i gathered, i can not really determine, how the ADC would work in combination with DMA. When i start regular conversions on ADC2, is it then considered dual mode?

It would be helpful to have a checklist, or a table, that show what has to be orcan be set in different modes. Is there such information availlable? Or anyone knows of a good tutorial?

6 REPLIES 6
AScha.3
Chief III

>Using HAL is no option.

Why? Its just doing the setup , as you want it. The speed of ADC is always same - using HAL , or not.

 

>- When in Injected simultaneous mode, regular conversions are possible, but use the settings of the common registers for dual settings?

AScha3_0-1714545830634.png

AScha3_1-1714546282361.png

> - Picture "say what": It does not really say how it would behave in that case.

AScha3_2-1714546470502.png

 

>- With all the information i gathered, i can not really determine, how the ADC would work in combination with DMA

Same way, as on other cpus , just more complex than on an old F103 (DMA + MDMA ),

maybe read the 120 pages of ADC in rm ... or use HAL for making it more easy.

AScha3_3-1714546995966.png

 

>Or anyone knows of a good tutorial?

Did you check the app notes for the cpu you use ? (here G474 -> )

https://www.st.com/en/microcontrollers-microprocessors/stm32g474re.html#documentation

and general ADC ->

https://www.st.com/content/st_com/en/search.html#q=ADC-t=resources-page=1

 

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

HAL uses too much space, and i also need to understand how things work in order to have them doing exactly what i want.

You have posted a picture of the wrong mode. Yes, its confusing sometimes.

Thanks for your information, but i could not get the information that answers my questions.

I trying to make things simpler, by just using ADC2 regular, but things arent working anyway. Isnt there a checklist, for settings that must be setup with DMA? Those steps in the manual are just not sufficient. I have worked the first time with ADC and DMA before (Without HAL), but i cant combine them. But maybe i am just missing some hidden but yet important information.

 

>HAL uses too much space

On a cpu with 512K flash (G474 ) the 10..20K for HAL are "too much" ? really ??

btw. You could also use the LL lib, needing about same space , as bare metal .

>Isnt there a checklist, for settings that must be setup with DMA? 

I would use the HAL , to do the setup - even if you dont wanna use it in the end - but ,

just to look, how its doing the setup . Then you know, how to do it.

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

Why do you think i got the G474?

Wrong - you didnt tell , which cpu you have, so cannot know.

I took just a G4 , i looked at and have ds and rm, as an example.

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

You should have asked then, and not written about assumptions.

Its a G431KBT6