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

scripts: west_commands:runners: nrf_common: uicr pinreset check #73813

Closed

Conversation

hlord2000
Copy link
Contributor

Changes the default behavior of target reset on the nRF52 series if
the reset pin is configured as a GPIO.

If CONFIG_GPIO_AS_PINRESET is not enabled, the default flashing behavior
of 'west flash' would reconfigure UICR with 'pinreset-enable,' making
it unclear why the RESET pin is not acting as a GPIO. This warns the user
of this behavior and switches to 'softreset' instead.

Signed-off-by: Helmut Lord [email protected]

Changes the default behavior of target reset on the nRF52 series if
the reset pin is configured as a GPIO.

If CONFIG_GPIO_AS_PINRESET is not enabled, the default flashing behavior
of 'west flash' would reconfigure UICR with 'pinreset-enable,' making
it unclear why the RESET pin is not acting as a GPIO. This warns the user
of this behavior and switches to 'softreset' instead.

Signed-off-by: Helmut Lord <[email protected]>
…NRESET

Adds CONFIG_GPIO_AS_PINRESET to mocked tests

Signed-off-by: Helmut Lord <[email protected]>
@hlord2000
Copy link
Contributor Author

My second commit addresses the failing tests by adding "CONFIG_GPIO_AS_PINRESET" to the mocked ".conf" file. I'm unfamiliar with the west command testing framework so any suggestions would be appreciated if test coverage of this behavior is required. Thanks!

Copy link
Collaborator

@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.

This is not valid, that Kconfig is deprecated, it is a dts entry now and you cannot rely upon the value of that anyway because it's a UICR part, someone can write to the UICR enabling it or a different image can set it, it doesn't have to be the currently running application. Users should set their board files up properly to select the correct type of reset

Copy link
Collaborator

@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.

Not valid

@hlord2000 hlord2000 closed this Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: West West utility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants