Skip to content

ironside tdd service #2938

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

Merged
merged 3 commits into from
Jul 2, 2025
Merged

ironside tdd service #2938

merged 3 commits into from
Jul 2, 2025

Conversation

karstenkoenig
Copy link
Contributor

@karstenkoenig karstenkoenig commented Jun 5, 2025

Added support for the IronSide TDD service which allows configuring and
powering the trace and debug domain of the nrf54h20.
Also provide option to start the trace and debug domain in the soc start
sequence.

Comment on lines +62 to +53
__constant U32 _CORESIGHT_CLAIMSET_OFFSET = 0xFA0;
__constant U32 _CORESIGHT_CLAIMCLR_OFFSET = 0xFA4;
Copy link
Contributor

Choose a reason for hiding this comment

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

This usage of the CLAIM register is not standardized, but instead a bespoke solution that we made. Should we leave CLAIM configuration out here? It could always be added later if necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Given this is in a nordic specific file I feel this is ok, we aren't providing a general jlink script to configure coresight peripherals here

@karstenkoenig karstenkoenig force-pushed the ironside_tdd branch 3 times, most recently from 9b827dd to 079ffa6 Compare June 24, 2025 13:52
#if defined(CONFIG_SOC_NRF54H20_ENABLE_TDD)
int err_tdd;

err_tdd = ironside_se_tdd_configure(IRONSIDE_SE_TDD_CONFIG_ON_DEFAULT);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this also be invoked by PM state changes, if I'm not misunderstanding?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In a final solution it can be, right now this will just force on tdd and leave it at that, hence preventing having to reconfigure all the coresight peripherals after a sleep etc, because JLink couldn't handle this.
This can be done when we have the coresight peripherals controlled from the application core but that'll need more time while this allows ETM over TPIU as a static state and is useful like this as is, just not power efficient

@karstenkoenig karstenkoenig force-pushed the ironside_tdd branch 4 times, most recently from ce33c40 to d8082ca Compare June 28, 2025 08:46
@karstenkoenig karstenkoenig marked this pull request as ready for review June 28, 2025 08:47
@karstenkoenig karstenkoenig force-pushed the ironside_tdd branch 5 times, most recently from e51d881 to d89da5d Compare June 30, 2025 08:07
@karstenkoenig
Copy link
Contributor Author

@57300 I dropped the JLink change as we can pull this into a designated commit and PR to enable ETM

Copy link
Contributor

@nordicjm nordicjm left a comment

Choose a reason for hiding this comment

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

Upstream CI is completely red and has no approvals

@karstenkoenig karstenkoenig force-pushed the ironside_tdd branch 2 times, most recently from aa1bee3 to 2976389 Compare July 1, 2025 07:48
@karstenkoenig
Copy link
Contributor Author

karstenkoenig commented Jul 1, 2025

@nordicjm upstream CI is green after cherry-picking a fix from a different PR, so added this here as well. Can you please check again?
sdk-nrf CI is red but that's because it still uses the outdated nrf54h20dk/nrf54h20/cpuapp/iron, this won't be merged before this is green anyways but it'd be nice to clear your change for request here before then.

You will notice a [noup] commit, sadly this can't be done upstream yet as it can go on relies on two different upstream PRs and hence doesn't have a place upstream, we can only do this after those get merged after the feature PRs are allowed again. I opened NCSDK-34289 against myself to follow up on this commit

Added support for the IronSide TDD service which allows configuring and
powering the trace and debug domain of the nrf54h20.
Also provide option to start the trace and debug domain in the soc start
sequence.

Upstream PR #: 92340
Signed-off-by: Karsten Koenig <karsten.koenig@nordicsemi.no>
Added support for ETM tracing via TPIU to the JLinkScript.

Upstream PR #: 92340
Signed-off-by: Karsten Koenig <karsten.koenig@nordicsemi.no>
Configure the CTRLSET value and the clock pin so that the TRACE pins
work when the TDD gets used.

Signed-off-by: Karsten Koenig <karsten.koenig@nordicsemi.no>
Copy link

sonarqubecloud bot commented Jul 1, 2025

@nordicjm nordicjm merged commit a6a46c9 into nrfconnect:main Jul 2, 2025
19 checks passed
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