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

lights: Add LP5562 RGBLED driver #21649

Merged
merged 1 commit into from Jun 6, 2023
Merged

lights: Add LP5562 RGBLED driver #21649

merged 1 commit into from Jun 6, 2023

Conversation

julianoes
Copy link
Contributor

@julianoes julianoes commented May 29, 2023

This adds support for the TI LP5562 RGB LED driver.

Things to note:

  • The driver is initialized in simple PWM mode using its internal clock, for R,G,B, but not for W(hite).
  • The chip doesn't have a WHO_AM_I or DEVICE_ID register to check. Instead we read the W_CURRENT register that we're generally not using and therefore doesn't get changed.
  • The current is left at the default 17.5 mA but could be changed using the command line argument.

Datasheet:
https://www.ti.com/lit/ds/symlink/lp5562.pdf

Tested on the bench using a Pixhawk 6X.

This is required for some of the Holybro products switching to it.
FYI @vincentpoont2.

Needs backporting to v1.14.

@julianoes julianoes requested a review from davids5 May 29, 2023 02:53
@julianoes julianoes requested a review from dagar May 30, 2023 06:02
Copy link
Member

@davids5 davids5 left a comment

Choose a reason for hiding this comment

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

See inline

src/drivers/lights/rgbled_lp5562/rgbled_lp5562.cpp Outdated Show resolved Hide resolved
@DronecodeBot
Copy link

This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/px4-maintainers-call-may-30-2023/32372/1

@julianoes
Copy link
Contributor Author

Thanks for the review @davids5 and @dagar. I've address both points and rebased it.

davids5
davids5 previously approved these changes May 31, 2023
Copy link
Member

@davids5 davids5 left a comment

Choose a reason for hiding this comment

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

LGTM

@julianoes julianoes force-pushed the pr-rgbled-lp5562 branch 2 times, most recently from 1f3b90c to 67af398 Compare June 4, 2023 22:09
This adds support for the TI LP5562 RGB LED driver.

Things to note:
- The driver is initialized in simple PWM mode using its internal clock,
  for R,G,B, but not for W(hite).
- The chip doesn't have a WHO_AM_I or DEVICE_ID register to check.
  Instead we read the W_CURRENT register that we're generally not using
  and therefore doesn't get changed.
- The current is left at the default 17.5 mA but could be changed using
  the command line argument.

Datasheet:
https://www.ti.com/lit/ds/symlink/lp5562.pdf

Signed-off-by: Julian Oes <julian@oes.ch>
@julianoes
Copy link
Contributor Author

It looks like CI is the same as main, so I'll merge this now so I can backport it to v1.14 in time. Thanks for the reviews!

@julianoes julianoes merged commit cd485b3 into main Jun 6, 2023
82 of 86 checks passed
@julianoes julianoes deleted the pr-rgbled-lp5562 branch June 6, 2023 01:12
@DronecodeBot
Copy link

This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/px4-maintainers-call-june-06-2023/32473/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants