Skip to content

Regular channel read for stm32 (while injected ADC conversion runnig)#506

Open
askuric wants to merge 3 commits intofeat_stm32_multiple_motorsfrom
feat_stm32_read_regular_while_injected_running
Open

Regular channel read for stm32 (while injected ADC conversion runnig)#506
askuric wants to merge 3 commits intofeat_stm32_multiple_motorsfrom
feat_stm32_read_regular_while_injected_running

Conversation

@askuric
Copy link
Member

@askuric askuric commented Jan 7, 2026

Description

This PR is an initial proposition of the reagular ADC channel reads on stm32 that

  • Is more efficient than analogRead
  • Allows reading regular ADC channels even if the Injected channles are read (ex. low-side current sesnig)

NOTE
It still uses the polling strategy, no DMA so it is still blocking and is not intended to be called to often.
On f405 boards the ADC read time is around 20us and on g4 is similar.
For reference analogRead takes about 60us+

Tested setups
Tested on f4 and g4 boards with different setups.
Did not test on other boards though, but none of the original API calls shouldn't be affected by this.

@askuric
Copy link
Member Author

askuric commented Jan 19, 2026

tested on f1 too.
It works.
The time is around 40us.
The analogRead is around 80us for f1.

@runger1101001 runger1101001 added this to the 2.4.0_Release milestone Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants