Skip to content

Improvements to LinearHall#96

Open
dekutree64 wants to merge 1 commit into
simplefoc:devfrom
dekutree64:dev
Open

Improvements to LinearHall#96
dekutree64 wants to merge 1 commit into
simplefoc:devfrom
dekutree64:dev

Conversation

@dekutree64

@dekutree64 dekutree64 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor
  • Added calibration for difference in the total range of each sensor from XieMaster's version, optimized to a single multiply.
  • Added option for 60° and 120° sensor spacing.
  • Added wait for first valid sensor readings in init, for some custom ADC setups.
  • Changed private to protected and moved getSensorAngle there, better matching other sensor classes.
  • Moved documentation from the header to a readme file.

Tested by o_lampe and myself.

* Added calibration for difference in the total range of each sensor from XieMaster's version, optimized to a single multiply.
* Added option for 60° and 120° sensor spacing.
* Added wait for first valid sensor readings in init, for some custom ADC setups.
* Changed private to protected and moved getSensorAngle there, better matching other sensor classes.
* Moved documentation from the header to a readme file.
@github-actions

Copy link
Copy Markdown

Memory usage change @ 6a4290f

Board flash % RAM for global variables %
adafruit:samd:adafruit_metro_m4 🔺 0 - +408 0.0 - +0.08 N/A N/A
rp2040:rp2040:rpipico 🔺 0 - +408 0.0 - +0.02 🔺 0 - +8 0.0 - 0.0
arduino:sam:arduino_due_x 🔺 0 - +408 0.0 - +0.08 N/A N/A
arduino:samd:nano_33_iot 🔺 0 - +408 0.0 - +0.16 🔺 0 - +8 0.0 - +0.02
esp32:esp32:esp32 🔺 +24 - +24 0.0 - 0.0 0 - 0 0.0 - 0.0
esp32:esp32:esp32s2 🔺 +24 - +444 0.0 - +0.03 🔺 0 - +8 0.0 - 0.0
STMicroelectronics:stm32:GenF1:pnum=BLUEPILL_F103C8 🔺 0 - +416 0.0 - +0.63 🔺 0 - +8 0.0 - +0.04
STMicroelectronics:stm32:Nucleo_64:pnum=NUCLEO_F411RE 🔺 0 - +400 0.0 - +0.08 🔺 0 - +8 0.0 - +0.01
Click for full report table
Board examples/drivers/drv8316/drv8316_3pwm
flash
% examples/drivers/drv8316/drv8316_3pwm
RAM for global variables
% examples/drivers/drv8316/drv8316_6pwm
flash
% examples/drivers/drv8316/drv8316_6pwm
RAM for global variables
% examples/encoders/calibrated_sensor/calibration_save
flash
% examples/encoders/calibrated_sensor/calibration_save
RAM for global variables
% examples/encoders/linearhall
flash
% examples/encoders/linearhall
RAM for global variables
% examples/encoders/mt6816/mt6816_spi
flash
% examples/encoders/mt6816/mt6816_spi
RAM for global variables
% examples/encoders/calibrated_sensor/calibrated
flash
% examples/encoders/calibrated_sensor/calibrated
RAM for global variables
%
adafruit:samd:adafruit_metro_m4 0 0.0 N/A N/A 0 0.0 N/A N/A 0 0.0 N/A N/A 408 0.08 N/A N/A 0 0.0 N/A N/A
rp2040:rp2040:rpipico 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 408 0.02 8 0.0 0 0.0 0 0.0
arduino:sam:arduino_due_x 0 0.0 N/A N/A 0 0.0 N/A N/A 0 0.0 N/A N/A 408 0.08 N/A N/A 0 0.0 N/A N/A
arduino:samd:nano_33_iot 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 408 0.16 8 0.02 0 0.0 0 0.0
esp32:esp32:esp32 24 0.0 0 0.0 24 0.0 0 0.0 24 0.0 0 0.0 24 0.0 0 0.0
esp32:esp32:esp32s2 24 0.0 0 0.0 24 0.0 0 0.0 24 0.0 0 0.0 444 0.03 8 0.0 24 0.0 0 0.0
STMicroelectronics:stm32:GenF1:pnum=BLUEPILL_F103C8 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 416 0.63 8 0.04
STMicroelectronics:stm32:Nucleo_64:pnum=NUCLEO_F411RE 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 400 0.08 8 0.01 0 0.0 0 0.0 0 0.0 0 0.0
Click for full report CSV
Board,examples/drivers/drv8316/drv8316_3pwm<br>flash,%,examples/drivers/drv8316/drv8316_3pwm<br>RAM for global variables,%,examples/drivers/drv8316/drv8316_6pwm<br>flash,%,examples/drivers/drv8316/drv8316_6pwm<br>RAM for global variables,%,examples/encoders/calibrated_sensor/calibration_save<br>flash,%,examples/encoders/calibrated_sensor/calibration_save<br>RAM for global variables,%,examples/encoders/linearhall<br>flash,%,examples/encoders/linearhall<br>RAM for global variables,%,examples/encoders/mt6816/mt6816_spi<br>flash,%,examples/encoders/mt6816/mt6816_spi<br>RAM for global variables,%,examples/encoders/calibrated_sensor/calibrated<br>flash,%,examples/encoders/calibrated_sensor/calibrated<br>RAM for global variables,%
adafruit:samd:adafruit_metro_m4,0,0.0,N/A,N/A,0,0.0,N/A,N/A,0,0.0,N/A,N/A,408,0.08,N/A,N/A,0,0.0,N/A,N/A
rp2040:rp2040:rpipico,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,408,0.02,8,0.0,0,0.0,0,0.0
arduino:sam:arduino_due_x,0,0.0,N/A,N/A,0,0.0,N/A,N/A,0,0.0,N/A,N/A,408,0.08,N/A,N/A,0,0.0,N/A,N/A
arduino:samd:nano_33_iot,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,408,0.16,8,0.02,0,0.0,0,0.0
esp32:esp32:esp32,24,0.0,0,0.0,24,0.0,0,0.0,24,0.0,0,0.0,,,,,24,0.0,0,0.0
esp32:esp32:esp32s2,24,0.0,0,0.0,24,0.0,0,0.0,24,0.0,0,0.0,444,0.03,8,0.0,24,0.0,0,0.0
STMicroelectronics:stm32:GenF1:pnum=BLUEPILL_F103C8,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,416,0.63,8,0.04,,,,
STMicroelectronics:stm32:Nucleo_64:pnum=NUCLEO_F411RE,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,400,0.08,8,0.01,0,0.0,0,0.0,0,0.0,0,0.0

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.

1 participant