Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] STM32 Generic ADC input #448

Open
Moddingear opened this issue Jan 19, 2025 · 2 comments
Open

[FEATURE] STM32 Generic ADC input #448

Moddingear opened this issue Jan 19, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@Moddingear
Copy link

Is your feature request related to a problem? Please describe.
Right now, using any sort of current sense on STM32 hogs the corresponding ADCs. Thus, there is no way to add other sensors such as temperature, battery voltage or a simple potentiometer.

Describe the solution you'd like
An API to add other sensors to be included in the DMA

Additional context
I'm using the STM32 BG431-ESC1 as a test platform, with Arduino on platformio. analogRead (or any other ADC-related function) won't work.

@Moddingear Moddingear added the enhancement New feature or request label Jan 19, 2025
@Moddingear
Copy link
Author

For those in the same case as me : There's a workaround builtin.

Follow this https://community.simplefoc.com/t/temperature-monitoring-on-b-g431b-esc1/2955/15, except that you should _readADCVoltageLowSide instead of _readADCVoltageInline (as inline uses analogRead). It works for all of the board's inputs

@runger1101001
Copy link
Member

We're working on a new STM32 current sense driver, and this functionality will be part of it. For the moment, the workaround you suggested will work on some boards, I think.

We can leave this issue open until we finish the new current sense driver, but it may take a while, please don't hold your breath.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants