Skip to content

Feature/direct register access #5

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

Merged
merged 3 commits into from
Apr 30, 2025
Merged

Conversation

ederjc
Copy link
Member

@ederjc ederjc commented Apr 30, 2025

By creating this pull request you agree to the terms in CONTRIBUTING.md.
https://github.com/Infineon/.github/blob/master/CONTRIBUTING.md
--- DO NOT DELETE ANYTHING ABOVE THIS LINE ---

CONTRIBUTING.md also tells you what to expect in the PR process.

Description

This pull request introduces a new example for motor control, updates the library version, and adds enhancements to the Tle94112 library. The most significant changes include the addition of a new example demonstrating direct register control for motors, the introduction of new constructors and methods for the Tle94112 class, and the definition of additional register constants. These changes aim to improve functionality and flexibility for motor control applications.

New Example for Motor Control:

  • Added a new example file examples/directRegisterControl/directRegisterControl.ino demonstrating how to control two motors via direct register settings. It includes motor direction and speed control functions, setup configurations, and a loop for motor operation.

Enhancements to the Tle94112 Library:

  • Added a new constructor in Tle94112Ino to support individual pin assignment for both CS (chip select) and EN (enable) pins. [1] [2]
  • Introduced a directWriteReg method in the Tle94112 class for directly writing data to a specific register, enabling more efficient motor control. [1] [2]
  • Defined additional register constants (e.g., REG_ACT_1, REG_PWM_DC_1, HH_LL, LL_HH) in src/tle94112-types.hpp to facilitate direct register operations.

Version Updates:

  • Updated the library version from 4.1.1 to 4.2.0 in both library.json and library.properties to reflect the new features and improvements. [1] [2]

Documentation Improvements:

  • Updated the documentation for the Tle94112Ino constructors to clarify the purpose of the CS and EN pins.

Related Issue

  1. Relatively slow switching of half bridges leads to due to multiple SPI transfers can be an issue in some applications -> Register can now be written directly.
  2. Enable pin needs to be set in library -> can now be set in constructor.

@ederjc ederjc requested a review from OlafFilies April 30, 2025 15:12
Copy link
Member

@OlafFilies OlafFilies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks Ok so far.

@ederjc ederjc merged commit 18ac483 into master Apr 30, 2025
10 of 13 checks passed
@jaenrig-ifx jaenrig-ifx deleted the feature/direct-register-access branch May 23, 2025 11:43
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.

2 participants