Skip to content

drivers: sensor: Add LPC internal temperature sensor #90418

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

wilkinsw
Copy link

@wilkinsw wilkinsw commented May 24, 2025

The LPC ADC has a dedicated input channel for an on-chip temperature sensor. This pull request does the following:

  1. Add support for reading the temperature channel to adc_mcux_lpadc.c
  2. Add a sensor driver that makes use of the ADC to read die temperature.
  3. Update the board files for the LPC55S1X SoC to add adc0
  4. Add an lpcxpresso55s16 overlay to the die_temp_polling sample for demonstration/testing.

This was developed and tested on an LPC5516, but it should work on the other SoCs in the LPC family as well as other chips that use the LPADC such as the RT6XX series.

@github-actions github-actions bot added area: Sensors Sensors platform: NXP Drivers NXP Semiconductors, drivers platform: NXP NXP area: ADC Analog-to-Digital Converter (ADC) labels May 24, 2025
@wilkinsw wilkinsw marked this pull request as draft May 24, 2025 04:17
@wilkinsw wilkinsw force-pushed the feature/nxp-lpc-temp branch 3 times, most recently from f41dec2 to 0b06d2e Compare May 27, 2025 21:59
The LPC ADC has a dedicated input channel for an on-chip
temperature sensor. This commit adds support for defining
and reading from that channel.

Signed-off-by: Wilkins White <ww@novadynamics.com>
@wilkinsw wilkinsw force-pushed the feature/nxp-lpc-temp branch from 0b06d2e to c5ee8a6 Compare May 27, 2025 22:05
@wilkinsw wilkinsw marked this pull request as ready for review May 27, 2025 22:07
@github-actions github-actions bot added the area: Samples Samples label May 27, 2025
@wilkinsw wilkinsw force-pushed the feature/nxp-lpc-temp branch from c5ee8a6 to d31bd1d Compare May 28, 2025 17:45
@wilkinsw
Copy link
Author

Fixed duplicated tag

@wilkinsw wilkinsw force-pushed the feature/nxp-lpc-temp branch from d31bd1d to 8ca843f Compare May 28, 2025 21:27
@wilkinsw
Copy link
Author

Fix line length and bracket failures

@wilkinsw wilkinsw force-pushed the feature/nxp-lpc-temp branch from 8ca843f to 29898fc Compare May 28, 2025 21:33
@wilkinsw
Copy link
Author

Fixed blank line at end of yaml file

wilkinsw added 3 commits May 28, 2025 15:03
The LPC ADC has a dedicated input channel for an on-chip
temperature sensor. This commit adds a sensor driver for
reading the die temperature.

Signed-off-by: Wilkins White <ww@novadynamics.com>
This commit adds adc0 for the NXP LPC55S1x SoC.

Signed-off-by: Wilkins White <ww@novadynamics.com>
This commit adds overlays for the lpcxpresso55s16 to read
die temperature from the dedicated ADC channel.

Signed-off-by: Wilkins White <ww@novadynamics.com>
@wilkinsw wilkinsw force-pushed the feature/nxp-lpc-temp branch from 29898fc to 0b4d31c Compare May 28, 2025 22:03
@wilkinsw
Copy link
Author

Fix C99 style comment

Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ADC Analog-to-Digital Converter (ADC) area: Samples Samples area: Sensors Sensors platform: NXP Drivers NXP Semiconductors, drivers platform: NXP NXP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants