FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Feat h7 current sensing by askuric · Pull Request #460 · simplefoc/Arduino-FOC · GitHub

Feat h7 current sensing - #460

Merged
runger1101001 merged 15 commits into
devfrom
feat_h7_current_sensing
May 16, 2025
Merged

Feat h7 current sensing#460
runger1101001 merged 15 commits into
devfrom
feat_h7_current_sensing

Conversation

askuric commented Mar 19, 2025

Copy link
Copy Markdown
Member
  • This PR adds the low-side current sensing for H7 boards.
  • There are some cleanups of the driver code as well, minimal though
  • The current sensing does not work with portenta for the moment - did not have on me at the moment so I could not really test the MBED integration properly.
  • Also I've added portenta and a few other MBED boards to the compile CI

askuric changed the base branch from master to dev March 19, 2025 10:36
askuric added the enhancement New feature or request label Mar 24, 2025

askuric commented Apr 29, 2025
edited
Loading

Copy link
Copy Markdown
Member Author

H7 low-side is working, I've tested it with the SimpleFOCMini v2.
Before this commit it did not work properly actually. It did not handle the repetition counter missing.

I did find something strange though. In the case where the repetition counter is handled in the software (in the interrupt handler) where we count and use every second measurement, for H7 we have to start from the 2nd call of the interrupt while the other architectures were starting from the 1st call. There is a shift of one interrupt call. I am not sure where does it come from.
I'm wondering if this shift is persistent between the architectures (always the same for the same family) or is it different for different timers, or is there something else going on. In any case I did not see this before.

We need to investigate this!

Here is the code for h7:

if( needs_downsample[adc_index] && tim_downsample[adc_index]++ > 1) {
tim_downsample[adc_index] = 1;
return;
}

And for g4:

if( needs_downsample[adc_index] && tim_downsample[adc_index]++ > 0) {
tim_downsample[adc_index] = 0;
return;
}

Copy link
Copy Markdown
Member

How about this one? It still has conflicts...

askuric commented May 14, 2025

Copy link
Copy Markdown
Member Author

Should be all good now!

Copy link
Copy Markdown
Member

Lets merge it :-)

runger1101001 added this to the 2.3.5_Release milestone May 16, 2025
runger1101001 merged commit 0bb487a into dev May 16, 2025
askuric linked an issue Jul 26, 2025 that may be closed by this pull request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

[BUG] Copy/paste error in stm32g4 current sense

2 participants


Back | FazBrowse Home | New Git URL