Skip to content

Add support for NXP S32K148 evaluation board #85555

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 3 commits into
base: main
Choose a base branch
from

Conversation

marcin-wierzbicki
Copy link
Contributor

@marcin-wierzbicki marcin-wierzbicki commented Feb 11, 2025

Add support for NXP S32K148 evaluation board.

The board can be debugged using "west debug" command (see boards/nxp/s32k148_evb/doc/index.rst).

Adapt samples: adc_dt, adc_sequence.
Adapt tests: adc_api, gpio_basic_api, gpio_hogs.

See Add support for S32K148 SoC

@manuargue manuargue assigned manuargue and unassigned anangl Feb 11, 2025
@manuargue
Copy link
Member

See zephyrproject-rtos/hal_nxp#509

@marcin-wierzbicki please update the hal_nxp entry in the west manifest to point to that pr

@manuargue
Copy link
Member

manuargue commented Feb 11, 2025

Add driver for TJA1101 PHY device.

I'd recommend to keep this first PR smaller including basic enablement of the SoC and board, and split the PHY driver into another PR for easier review. This will likely also help you to move the prs faster. This is not mandatory, but in general a good practice.

@marcin-wierzbicki
Copy link
Contributor Author

Add driver for TJA1101 PHY device.

I'd recommend to keep this first PR smaller including basic enablement of the SoC and board, and split the PHY driver into another PR for easier review. This will likely also help you to move the prs faster. This is not mandatory, but in general a good practice.

Sure. Thank you.

@marcin-wierzbicki
Copy link
Contributor Author

Updated the hal_nxp entry in the west manifest to point to nxp_hal PR.
Moved changes related to nxp_pedbg runner to separate commit.

Please review the PR.

maass-hamburg
maass-hamburg previously approved these changes Mar 26, 2025
@KevShaju KevShaju force-pushed the s32k148evb_support_pr branch from c9a0eb8 to 47bdd44 Compare March 28, 2025 07:11
@KevShaju KevShaju force-pushed the s32k148evb_support_pr branch from 47bdd44 to 274e66c Compare April 1, 2025 05:59
kartben
kartben previously approved these changes Apr 2, 2025
Copy link
Collaborator

@kartben kartben left a comment

Choose a reason for hiding this comment

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

+1 for docs

@KevShaju KevShaju force-pushed the s32k148evb_support_pr branch 2 times, most recently from 52c4aa9 to e99301b Compare April 3, 2025 11:17
Copy link
Member

Choose a reason for hiding this comment

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

As far as I understand, you are proposing a west runner for P&E micro multilink debug probe to be used for NXP S32K1 devices through NXP S32DS IDE... If you plan to support P&E micro debug probe it would make more sense to create a generic runner for it that can work with any chip supported by the probe. Also note that P&E micro multilink debug probe is not from NXP.

If you want to enable a runner for this specific chip, I'd suggest for this first enablement PR to only enable JLink which supports this chip (https://www.segger.com/supported-devices/jlink/nxp/s32k1) and that there's already a west runner for it and move P&E micro multilink support to a separate PR. You can find a reference on how to enable JLink here: https://github.com/zephyrproject-rtos/zephyr/blob/main/boards/nxp/ucans32k1sic/board.cmake#L4-L9

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As far as I understand, you are proposing a west runner for P&E micro multilink debug probe to be used for NXP S32K1 devices through NXP S32DS IDE... If you plan to support P&E micro debug probe it would make more sense to create a generic runner for it that can work with any chip supported by the probe. Also note that P&E micro multilink debug probe is not from NXP.

Right. Let me implement that in a more generic way.

If you want to enable a runner for this specific chip, I'd suggest for this first enablement PR to only enable JLink which supports this chip (https://www.segger.com/supported-devices/jlink/nxp/s32k1) and that there's already a west runner for it and move P&E micro multilink support to a separate PR. You can find a reference on how to enable JLink here: https://github.com/zephyrproject-rtos/zephyr/blob/main/boards/nxp/ucans32k1sic/board.cmake#L4-L9

We tried jlink with these params:

board_runner_args(jlink
  "--device=S32K148"
  "--speed=4000"
  "--iface=jtag"
  "--reset"
)

Both, "west debug" and "west flash" are working. However, "west flash" waits for an input on stdin. After pressing Enter, it finishes about 1 second later and the board is flashed:

-- west flash: rebuilding
ninja: no work to do.
-- west flash: using runner jlink
-- runners.jlink: reset after flashing requested
-- runners.jlink: JLink version: 8.24
-- runners.jlink: Flashing file: ../zephyr/build/zephyr/zephyr.hex

Copy link
Member

@manuargue manuargue Apr 11, 2025

Choose a reason for hiding this comment

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

I don’t have the hardware to test it unfortunately. Judging by https://kb.segger.com/NXP_S32K148#Connect:

The J-Link determines the security state as part of the connect sequence. If a secured device is detected, an un-secure is offered via dialog

You can try adding board_runner_args(jlink "--tool-opt=-autoconnect 1") or else run west -v flash and share the logs to have a look.

For the PEmicro west runner, please do it in a separate PR because is not going to be specific to this device and this PR is getting already too large for a "adding support for NXP S32K148 evaluation board" :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You can try adding board_runner_args(jlink "--tool-opt=-autoconnect 1") or else run west -v flash and share the logs to have a look.

We confirmed that these params are correct - no more ENTER needs to be pressed:

board_runner_args(jlink
  "--device=S32K148"
  "--speed=4000"
  "--iface=jtag"
  "--reset"
  "--tool-opt=-jtagconf -1,-1"
)

For the PEmicro west runner, please do it in a separate PR because is not going to be specific to this device and this PR is getting already too large for a "adding support for NXP S32K148 evaluation board" :)

Of course.

marcin-wierzbicki and others added 3 commits April 25, 2025 09:21
Support for NXP S32K148 evaluation board (s32k148_evb).

Adapt samples: adc_dt, adc_sequence.
Adapt tests: adc_api, gpio_basic_api, gpio_hogs.

Signed-off-by: Marcin Wierzbicki <marcin.wierzbicki@accenture.com>
Adds the c22 tja11xx driver.

Signed-off-by: Kevin Shaju <kevin.shaju@accenture.com>
Add a shield for NXP ADTJA1101 Ethernet Adapter. This shield can
be used with the s32k148_evb.

Signed-off-by: Kevin Shaju <kevin.shaju@accenture.com>
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: Clock Control area: Ethernet area: GPIO area: Samples Samples area: Shields Shields (add-on boards) area: West West utility DNM (manifest) This PR should not be merged (controlled by action-manifest) manifest manifest-hal_nxp platform: NXP Drivers NXP Semiconductors, drivers platform: NXP S32 NXP Semiconductors, S32
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants