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

Feat teensy4 lowside #392

Merged
merged 9 commits into from
Apr 19, 2024
Merged

Feat teensy4 lowside #392

merged 9 commits into from
Apr 19, 2024

Conversation

askuric
Copy link
Member

@askuric askuric commented Apr 19, 2024

Initial implementation of the teesny4 low-side current sensing support for 6pwm and 3pwm drivers.
The implmentation is limited to one motor and the moment and uses only one ADC (ADC1).

  • The 6pwm driver is supported by defalut.
  • The 3pwm driver is not supported by defualt.
    This is due to preserve the backward compatibility because, in order to use low-side current sensing with 3pwm drivers they need to be center aligned and using flexpwm timers. In the current simplefoc implementation we allow for using any combination of flexpwm timers and quadtimers. If the user wants to use low-side current sensing he needs to include TEENSY4_FORCE_CENTER_ALIGNED_3PWM build flag. By either
    • adding it in the platformio.ini file -DTEENSY4_FORCE_CENTER_ALIGNED_3PWM
    • uncommenting the line 13 in the src\drivers\hardware_specific\teensy\teensy4_mcu.cpp file.
      Additionally, make sure to use all three phases on flexpwm timers and on their A or B channels (it they are not simplefoc will show an error message).

In the next versions of the SimpleFOC we will make sure to make the usage of the 3pwm drivers with low-side current sensing a bit more straight forward.

@askuric askuric merged commit 782e719 into dev Apr 19, 2024
33 checks passed
@askuric askuric added this to the 2.3.3_Release milestone Apr 19, 2024
@askuric askuric deleted the feat_teensy4_lowside branch June 23, 2024 08:17
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