Skip to content
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

boards: nxp: frdm_k64f: use SW2 instead of SW3 for MCUboot #79715

Conversation

henrikbrixandersen
Copy link
Member

Use SW2 instead of SW3 for entering MCUboot serial recovery/USB DFU mode. Holding SW3 during reset results in a NMI, causing the boot process to halt.

Use SW2 instead of SW3 for entering MCUboot serial recovery/USB DFU
mode. Holding SW3 during reset results in a NMI, causing the boot process
to halt.

Signed-off-by: Henrik Brix Andersen <[email protected]>
@henrikbrixandersen
Copy link
Member Author

This fixes 4511662 for the frdm_k64f board, not sure if others have the same issue. @butok How was this commit tested?

Copy link
Member

@fabiobaltieri fabiobaltieri left a comment

Choose a reason for hiding this comment

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

oof, should there be a comment about it on that line? not a fan of cluttering devicetree files with comments but this may be worth it

@henrikbrixandersen
Copy link
Member Author

oof, should there be a comment about it on that line? not a fan of cluttering devicetree files with comments but this may be worth it

A comment about what above which line? Suggestions welcome :)

@fabiobaltieri
Copy link
Member

fabiobaltieri commented Oct 11, 2024

A comment about what above which line? Suggestions welcome :)

You are only changing one line :-) anyway, forget it I, I can't think of anything silly to add, would hate a comment that describes what signal doesn't do, imagine mcuboot-button0 = &user_button_2; /* this is not an NMI */, yikes

@henrikbrixandersen
Copy link
Member Author

You are only changing one line :-) anyway, forget it I, I can't think of anything silly to add, would hate a comment that describes what signal doesn't do, imagine mcuboot-button0 = &user_button_2; /* this is not an NMI */, yikes

We could add a comment above the declaration of SW3 (a line I did not change here) noting that this switch is NMI capable?

@fabiobaltieri
Copy link
Member

We could add a comment above the declaration of SW3 (a line I did not change here) noting that this switch is NMI capable?

Yeah that may work, just something that one would read while porting to a new board and not make the same mistake.

@butok
Copy link
Contributor

butok commented Oct 11, 2024

Thank you for catching this issue.

It was assumed that SW0 alias is functional for all boards, as it used by the basic Zephyr button example.
So the mcuboot-button0 was set to SW0 button value (user_button_3 for this platform).
It means that sw0 = &user_button_3 alias can be problematic.

@carlescufi carlescufi merged commit a285b8a into zephyrproject-rtos:main Oct 15, 2024
23 checks passed
@henrikbrixandersen henrikbrixandersen deleted the frdm_k64f_mcuboot_button_without_nmi branch October 22, 2024 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: NXP NXP size: XS A PR changing only a single line of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants