Skip to content

drivers: adc: Refactor and fix adc_msp_hsadc driver, add board overlays#12

Merged
padmaraghunathan90 merged 10 commits intodev_mspm33from
feature/mspm33-adc-driver-refactor
Feb 26, 2026
Merged

drivers: adc: Refactor and fix adc_msp_hsadc driver, add board overlays#12
padmaraghunathan90 merged 10 commits intodev_mspm33from
feature/mspm33-adc-driver-refactor

Conversation

@Aman-Lachhiramka-ti
Copy link
Collaborator

@Aman-Lachhiramka-ti Aman-Lachhiramka-ti commented Feb 17, 2026

Major refactoring of the MSPM33 HSADC driver to fix bugs, reduce complexity, and align with Zephyr ADC API conventions. Adds board overlays for upstream ADC samples and tests.

  • Bug fixes
  • Architecture simplification
  • Code Quality improvement
  • DT binding changes
  • Support of samples and tests

Testing:

  • adc_dt sample: validated ADC readings on LP_MSPM33C321A
  • adc_api test: channel setup and read operations pass
  • adc_error_cases test: error paths validated
  • adc_sequence sample validated

@Aman-Lachhiramka-ti Aman-Lachhiramka-ti self-assigned this Feb 17, 2026
@Aman-Lachhiramka-ti Aman-Lachhiramka-ti force-pushed the feature/mspm33-adc-driver-refactor branch from 3a4e40d to d9b2206 Compare February 17, 2026 07:44
@Aman-Lachhiramka-ti Aman-Lachhiramka-ti changed the title adc driver refactoring drivers: adc: Refactor and fix adc_msp_hsadc driver, add board overlays Feb 17, 2026
@Aman-Lachhiramka-ti Aman-Lachhiramka-ti force-pushed the feature/mspm33-adc-driver-refactor branch from d9b2206 to af4fb4e Compare February 17, 2026 09:08
@Aman-Lachhiramka-ti Aman-Lachhiramka-ti force-pushed the feature/mspm33-adc-driver-refactor branch 2 times, most recently from 730d6ba to cb70039 Compare February 20, 2026 08:10
@Aman-Lachhiramka-ti
Copy link
Collaborator Author

Aman-Lachhiramka-ti commented Feb 20, 2026

Added adc_dt, adc_sequence (samples) , adc_api, and adc_error_cases (tests) builds to dev_mspm33_build.yml for comprehensive ADC validation on LP_MSPM33C321A.

@Aman-Lachhiramka-ti Aman-Lachhiramka-ti force-pushed the feature/mspm33-adc-driver-refactor branch from 79ceb93 to 33c291b Compare February 20, 2026 09:36
Copy link

@MihiraMadhava MihiraMadhava left a comment

Choose a reason for hiding this comment

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

minor changes as per comments

@Aman-Lachhiramka-ti Aman-Lachhiramka-ti force-pushed the feature/mspm33-adc-driver-refactor branch 5 times, most recently from 35e065f to be14f03 Compare February 24, 2026 13:58
Update the DL APIs to latest SDK changes
Refactor data structures, functions and macros to improve code maintainability
and reduces complexity

Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Add overlay for TI lp_mspm33c321a board to run adc_dt sample.
Update overlay of adc_sequence sample.

Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
…rror_cases tests

Add device tree overlays to enable ADC testing on the lp_mspm33c321a board

Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Add support for external hardware-triggered DMA transfers
with proper trigger type configuratios.
Use BIT(channel) macro for better code clarity and compliance

Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Add optional dmas property to the adc binding to allow DMA based
result transfer from the ADC

Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Assign DMA channels and trigger sources to adc0 and adc1 nodes
for DMA transfer

Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Add optional DMA mode that reads conversion result from the
HSADC FIFO via DMA instead of the ISR. DMA mode is gated behind
CONFIG_ADC_MSP_HSADC_DMA and falls back to interrupt driven mode
when dmas property is absent

Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Enable DMA and ADC DMA Kconfig for the adc_dt sample on
lp_mspm33c321a board.

Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Add adc_dt, adc_sequence, adc_api, and adc_error_cases builds to
dev_mspm33_build.yml for comprehensive ADC validation on LP_MSPM33C321A.

Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Extend title underlines to match or exceed title length in the
LP_MSPM33C321A board documentation, resolving Sphinx build warnings.

Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
@Aman-Lachhiramka-ti Aman-Lachhiramka-ti force-pushed the feature/mspm33-adc-driver-refactor branch from be14f03 to 3172262 Compare February 25, 2026 11:55
@padmaraghunathan90 padmaraghunathan90 merged commit e728b3e into dev_mspm33 Feb 26, 2026
9 of 12 checks passed
@Aman-Lachhiramka-ti Aman-Lachhiramka-ti deleted the feature/mspm33-adc-driver-refactor branch March 6, 2026 12:24
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.

6 participants