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/bldc driver mcpwm fault #101

Merged
merged 2 commits into from
Aug 1, 2023
Merged

Conversation

finger563
Copy link
Contributor

Description

  • Update bldc_driver to set the fault pin as a mcpwm_fault configuration and to go into brake mode on fault
  • Updated bldc_driver to change how generators are configured to remove unnecessary warnings from macros.
  • Updated bldc_driver to free allocated memory for mcpwm objects in destructor.
  • Update bldc_motor sensor direction (in calibration) logging to be info so that it prints without needing debug level.

Motivation and Context

  • Improves memory handling (freeing resources) when driver is no longer needed
  • Removes warnings during compilation
  • Leverages MCPWM peripheral to immediately go into brake mode when fault is detected (so that user code doesn't have to manage that)
  • Improves how users can calibrate motors (using only INFO logs)

How has this been tested?

Building and running the bldc haptics example.

Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):

image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Hardware (schematic, board, system design) change
  • Software change

Checklist:

  • My change requires a change to the documentation.
  • I have added / updated the documentation related to this change via either README or WIKI

Software

  • I have added tests to cover my changes.
  • I have updated the .github/workflows/build.yml file to add my new test to the automated cloud build github action.
  • All new and existing tests passed.
  • My code follows the code style of this project.

* Update bldc_driver to set the fault pin as a mcpwm_fault configuration and to go into brake mode on fault
* Updated bldc_driver to change how generators are configured to remove unnecessary warnings from macros.
* Updated bldc_driver to free allocated memory for mcpwm objects in destructor.
* Update bldc_motor sensor direction (in calibration) logging to be info so that it prints without needing debug level.
@finger563 finger563 added enhancement New feature or request bldc Related to Brushless DC Motors labels Aug 1, 2023
@finger563 finger563 merged commit f77aafa into main Aug 1, 2023
39 checks passed
@finger563 finger563 deleted the feature/bldc_driver_mcpwm_fault branch August 1, 2023 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bldc Related to Brushless DC Motors enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant