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
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion scripts/west_commands/runners/nrf_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,12 @@ def program_hex_nrf53(self, erase_arg, qspi_erase_opt):

def reset_target(self):
if self.family == 'NRF52_FAMILY' and not self.softreset:
self.exec_op('pinreset-enable')
if self.build_conf.getboolean('CONFIG_GPIO_AS_PINRESET'):
self.exec_op('pinreset-enable')
else:
self.logger.warning('CONFIG_GPIO_AS_PINRESET is not enabled, '
'using softreset.')
self.softreset = True

if self.softreset:
self.exec_op('reset', option="RESET_SYSTEM")
Expand Down
3 changes: 3 additions & 0 deletions scripts/west_commands/tests/test_nrf.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,9 @@ def fix_up_runner_config(test_case, runner_config, tmpdir):
with open(dotconfig, 'w') as f:
f.write(f'''
CONFIG_SOC_SERIES_{test_case.family[:5]}X=y
''')
f.write('''
CONFIG_GPIO_AS_PINRESET=y
''')
to_replace['build_dir'] = tmpdir

Expand Down
Loading