Skip to content

Mcuxa lpdac test harness enhancement for second serial console checking with latest multi-dut support in twister-pytest - #112258

Merged
nashif merged 1 commit into
zephyrproject-rtos:mainfrom
nxp-upstream:mcuxa_lpdac_test
Aug 22, 2026
Merged

Mcuxa lpdac test harness enhancement for second serial console checking with latest multi-dut support in twister-pytest#112258
nashif merged 1 commit into
zephyrproject-rtos:mainfrom
nxp-upstream:mcuxa_lpdac_test

Conversation

@hakehuang

Copy link
Copy Markdown
Contributor
for mcux lpdac tests, the seconday uart is used, with dut pytest,
we can unify the test with two instance.

example usage:
    - baud: 115200
      connected: true
      id: "OY2JXE5XLYFEE"
      platform: frdm_mcxa346/mcxa346
      product: NXP
      runner: linkserver
      pre_script: /home/ubuntu/nxp/frdm_mcxa346/erase2.sh
      serial: COM0
      fixtures:
        - dac_fixture
    - connected: true
      id: "OY2JXE5XLYFEE"
      platform: unknown
      product: unknown
      runner: unknown
      serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
      serial_baud: 115200
      notes: "Auxiliary serial port, not flashed"

this depends on #91338

Copilot AI review requested due to automatic review settings June 29, 2026 08:29
@hakehuang hakehuang added the DNM This PR should not be merged (Do Not Merge) label Jun 29, 2026
@zephyrbot zephyrbot added area: Boards/SoCs area: DAC Digital-to-Analog Converter area: Samples Samples area: Tests Issues related to a particular existing or missing test platform: NXP NXP platform: NXP MCU labels Jun 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adds DAC (nxp,lpdac) support to the FRDM-MCXA266/346/366 boards. It defines the dac0 node in the shared SoC dtsi, enables/clocks it on the boards, adds DAC0 pinmux, updates board capability lists, and wires up the DAC sample plus a new pytest-based DAC API test that reads ztest results from the auxiliary UART (the DAC output pin conflicts with the default console LPUART2, so overlays move the console to LPUART3). It depends on PR #91338.

Changes:

  • Adds dac0 to the SoC dtsi and enables it on the three boards (board_common.dtsi, board.c clocks, pinctrl, board YAMLs).
  • Adds sample/test overlays moving console to LPUART3 plus README documentation.
  • Adds a pytest harness test reading DAC ztest output over a secondary UART.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
dts/arm/nxp/mcx/nxp_mcxaxx6_common.dtsi Adds disabled dac0 node for the SoC
boards/nxp/frdm_mcxaxx6/board_common.dtsi Enables dac0 with DAC0 pinmux by default
boards/nxp/frdm_mcxaxx6/board.c Adds SPC/clock init for DAC0
boards/nxp/frdm_mcxaxx6/frdm_mcxa{266,346,366}-pinctrl.dtsi Adds pinmux_dac0 on P2_2
boards/nxp/frdm_mcxaxx6/frdm_mcxa{266,346,366}.yaml Lists dac as supported
samples/drivers/dac/boards/frdm_mcxa{266,346,366}.overlay DAC sample overlays, console to LPUART3
samples/drivers/dac/README.rst Documents building/running on the three boards
tests/drivers/dac/dac_api/boards/frdm_mcxa{266,346,366}.overlay Test console overlays
tests/drivers/dac/dac_api/testcase.yaml Adds pytest DAC test entry
tests/drivers/dac/dac_api/pytest/test_dac.py Verifies DAC ztest output on aux UART

Comment thread boards/nxp/frdm_mcxaxx6/board_common.dtsi
Comment thread tests/drivers/dac/dac_api/pytest/test_dac.py Outdated
@hakehuang
hakehuang force-pushed the mcuxa_lpdac_test branch 4 times, most recently from 30a1f8f to 46942f4 Compare July 1, 2026 04:01
@hakehuang hakehuang removed the DNM This PR should not be merged (Do Not Merge) label Jul 1, 2026

@martinjaeger martinjaeger left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't fully understand why this is needed. Also the changes don't have anything to do with Mcux lpdac so far, so the title is misleading. Can you please clarify?

@hakehuang

hakehuang commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

I don't fully understand why this is needed. Also the changes don't have anything to do with Mcux lpdac so far, so the title is misleading. Can you please clarify?

@martinjaeger, this is because we are using a different UART for this particular case for those platforms, but still use default uart for other application, to make the CI can support such variation, this is necessary. otherwise, this board can only run pass with this case, all others fails. and this is only for drivers.dac.api.dac0_channel0_mcxaxx6 which is used by mcxa_lpadc

@nordicjm
nordicjm removed their request for review July 2, 2026 08:49
@hakehuang
hakehuang requested a review from martinjaeger July 3, 2026 05:20
@hakehuang
hakehuang force-pushed the mcuxa_lpdac_test branch 2 times, most recently from d4f94af to 6964cba Compare July 7, 2026 08:19
@hakehuang
hakehuang requested a review from Copilot July 7, 2026 08:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread tests/drivers/dac/dac_api/pytest/test_dac.py Outdated
Comment thread tests/drivers/dac/dac_api/pytest/test_dac.py Outdated
@hakehuang hakehuang changed the title Mcuxa lpdac test Mcuxa lpdac test enhancement for second serial console checking Jul 16, 2026
@hakehuang

Copy link
Copy Markdown
Contributor Author

@martinjaeger I update the title, this pr is about testing harness setting. Thanks

@hakehuang hakehuang changed the title Mcuxa lpdac test enhancement for second serial console checking Mcuxa lpdac test harness enhancement for second serial console checking with latest multi-dut support in twister-pytest Jul 16, 2026
Comment thread tests/drivers/dac/dac_api/tests.yaml Outdated
Comment thread tests/drivers/dac/dac_api/pytest/test_dac.py Outdated
Comment thread tests/drivers/dac/dac_api/pytest/test_dac.py Outdated
@hakehuang
hakehuang force-pushed the mcuxa_lpdac_test branch 3 times, most recently from eecbf52 to 6efa531 Compare July 23, 2026 09:43
Comment thread tests/drivers/dac/dac_api/pytest/test_dac0_channel0_mcxaxx6.py Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Convert LPDAC test to pytest using DeviceAdapter on AUX UART (index 1).
Update tests.yaml to harness: pytest and set pytest_root to test file.
Consolidate LineMatcher checks into one ordered call per review feedback.
Improves CI reliability for MCX Ax x6 boards using AUX serial output.

Signed-off-by: Hake Huang <hake.huang@nxp.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@sonarqubecloud

Copy link
Copy Markdown

@nashif
nashif merged commit a40df8e into zephyrproject-rtos:main Aug 22, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Boards/SoCs area: DAC Digital-to-Analog Converter area: Samples Samples area: Tests Issues related to a particular existing or missing test platform: NXP MCU platform: NXP NXP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants