Skip to content

Conversation

@uLipe
Copy link

@uLipe uLipe commented Oct 12, 2025

The intention of these changes are to improve the ADC reading execution speed, so we address it by moving all runtime ADC functions for ESP32 platform to the IRAM, since this memory is core-coupled regardless the ESP32 family there is no cache miss possibility and the latency is the lowest possible, it can save some precious microseconds.

Also this change prevents any crash to occur if the ESP32 chip to disable the ICACHE temporary, very likely to happen on dual-core chip variant like, ESP32, S3 and P4.

@uLipe uLipe changed the base branch from master to dev October 12, 2025 21:03
@uLipe
Copy link
Author

uLipe commented Oct 13, 2025

@runger1101001 @askuric PTAL.

And please let me know what is the best way to tag a PR to be reviewed.

Thank you.

@askuric
Copy link
Member

askuric commented Oct 14, 2025

LGTM :D
Although I'd prefer not to have so much formatting differences, it makes the actual changes much more difficult to see.

@runger1101001 runger1101001 added the enhancement New feature or request label Oct 14, 2025
@runger1101001 runger1101001 added this to the 2.3.6_Release milestone Oct 14, 2025
@runger1101001
Copy link
Member

Hey, merging the other two PRs has caused some conflicts on this one it seems... could you take a look then I can run the tests when that is fixed...

Regarding the formatting changes, are you using editorconfig? I think our projects currently don't have one, maybe its a good idea to add it?

@uLipe
Copy link
Author

uLipe commented Oct 14, 2025

@runger1101001 sure, I will do a proper rebase then tag you again.

Regarding the format, it is probably my editor that was not configured properly, did you consider to use clang format? It is very popular and easy to use.

Thank you!

* It will improve the execution speed.
* It will prevent crashes if the chip disables the ICACHE

Signed-off-by: Felipe Neves <ryukokki.felipe@gmail.com>
@uLipe uLipe force-pushed the feature/esp32_low_side_adc_iram branch from c5b9d51 to a3991eb Compare October 14, 2025 15:15
@uLipe
Copy link
Author

uLipe commented Oct 14, 2025

@runger1101001 just rebased to dev, it should be good now.

I will take a detailed look on next PR to avoid this formatting changes, or maybe try to check how the clang_formatter works then submit an initial PR.

cc: @askuric

@runger1101001 runger1101001 merged commit 36df015 into simplefoc:dev Oct 14, 2025
28 checks passed
@runger1101001
Copy link
Member

I've merged it, and thank you!

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

Successfully merging this pull request may close these issues.

3 participants