-
Notifications
You must be signed in to change notification settings - Fork 2k
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/nrf52xxxdk: make reset pin work #10072
boards/nrf52xxxdk: make reset pin work #10072
Conversation
Hmm, have spend some more thought on this. Since the config is held in persistent memory, there is not need to check on every system boot. I will instead provide stand-alone application which provides the means to program the reset pin. |
Is it possible to use some GDB magic to write these values (persistently) to the device? |
have not found anything. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested it on the nrf52dk and works like a charm!
with #9407 and when using openocd, I think the reset pin works |
boards/common/nrf52xxxdk/board.c
Outdated
@@ -21,8 +21,46 @@ | |||
#include "cpu.h" | |||
#include "board.h" | |||
|
|||
#if defined(BOARD_NRF52DK) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not but the macros in the board.h file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or periph_conf.h ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be in place that LED0 macros are defined since it is basically a friendly name for a pin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But it is just for consideration, not trying to push.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, have spend some more thought on this. Since the config is held in persistent memory, there is not need to check on every system boot.
I will instead provide stand-alone application which provides the means to program the reset pin.
just wait some more minutes :-)
boards/common/nrf52xxxdk/board.c
Outdated
@@ -21,8 +21,46 @@ | |||
#include "cpu.h" | |||
#include "board.h" | |||
|
|||
#if defined(BOARD_NRF52DK) | |||
#define RESET_PIN (21U) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why pin 21 and 18?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This must be hardware related. nrf52832dk board reset is physically connected to P0.21.
Guess its P0.18 for nrf52840dk board.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ask Nordic why they have chosen them...
This new tool allows configuring the reset pin for nRF52-based boards. As the reset pin configuration is persistent, it does not make sense to include it into the board code...
2cf1704
to
0ca02de
Compare
Did rework this PR, now the actual configuration is put in its own tool. So no more runtime or code overhead for the existing board implementations. The tool is also usable for any other board we might stumble upon... |
@MrKevinWeiss would you mind to take another look? This PR is ready for final review. |
No problem! |
Tested on the nrf52dk, on one that had already been programmed and it was able to reset. I then tested it on one that had not been programmed and it worked. I don't have nrf52840dk so I cannot test on it. @haukepetersen can you (or anyone) confirm it works on the nrf52840dk? Maybe just add tools to the @defgroup in RIOT/doc.txt similar to the utils or something to make travis happy. |
@MrKevinWeiss I can confirm that the tool works also for nrf52840dk boards. |
Something is rather broken in the doxygen config, as *.c files should not even be looked at by doxygen, and the tool added here should also not show up in the API docs. |
strange. Is complaining about a doxygen group in So anyone any idea?! |
Restart build? |
It is not doxygen who checks existing groups but hand made shell stuff (based on regexp), that's why. |
The best would be to either remove the |
Or fixing the script ;-) diff --git a/dist/tools/doccheck/check.sh b/dist/tools/doccheck/check.sh
index 6cd2e6e..d55d3c6 100755
--- a/dist/tools/doccheck/check.sh
+++ b/dist/tools/doccheck/check.sh
@@ -32,7 +32,7 @@ then
fi
exclude_filter() {
- grep -v -e vendor -e examples -e tests
+ grep -v -e vendor -e examples -e tests -e dist
}
# Check all groups are defined |
Indeed ! |
See #10152! |
Looks good! ACK |
@miri64 thanks for addressing my issue! All green -> go. |
@MrKevinWeiss you beat me by 38 seconds :-) |
Contribution description
Ever wondered why on most/all of our
nrf52dk
andnrf52840dk
boards the reset pin is not working? Just stumbled upon the doc, where it states that the pin needs to be manually programmed (at least once) to work. This PR does exactly that, and voila, not the reset pins on those boards work like a charm.Testing procedure
nrf52dk
ornrf52840dk
board where the reset pin is not workingmake reset
, as the changes take one reset cycle to take effect)Issues/PRs references
none