-
Notifications
You must be signed in to change notification settings - Fork 2.1k
boards: add acd52832/nrf52832 #7501
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
Conversation
Quick note: I'd prefer to have the ADC driver and the new board configuration in separate PRs. @PeterKietzmann what to you think? |
+1 for splitting this PR. |
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 have some further comments regarding the ADC driver, but would prefer to handle them in a separate PR...
boards/acd52832/board.c
Outdated
/* initialize the boards LEDs */ | ||
NRF_P0->DIRSET = (LED0_MASK); | ||
NRF_P0->OUTSET = (LED0_MASK); | ||
NRF_P0->OUTSET = (LED0_MASK); |
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.
indention is off by two spaces
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.
also: the line above is duplicated...
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.
@haukepetersen Taken over from boards/nrf52dk/board.c
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.
then you can fix that file as well :-)
boards/acd52832/board.c
Outdated
* @file | ||
* @brief Board initialization for the nRF52 DK | ||
* | ||
* @author Hauke Petersen <hauke.petersen@fu-berlin.de> |
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.
author and copyright should be you? Also the brief description is wrong for this board.
boards/acd52832/include/board.h
Outdated
* @brief Board specific configuaration for the acd52832 | ||
* | ||
* @author Hauke Petersen <hauke.petersen@fu-berlin.de> | ||
* @author Sebastian Meiling <s@mlng.net> |
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.
same here
static const timer_conf_t timer_config[] = { | ||
{ | ||
.dev = NRF_TIMER1, | ||
.channels = 3, |
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.
both lines above have one space char too much after the equal sign
.dev = NRF_SPI0, | ||
.sclk = 4, | ||
.mosi = 3, | ||
.miso = 13 // NC |
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.
what is the // NC
comment supposed to mean here? If it is supposed to stay, there should be a more comprehensive comment and /* */
-style comment should be used.
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.
It means: Not Connected
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.
so not connected at all, also not to some pin header or similar? Maybe then it would make sense to set it to some undefined value and adapt the SPI driver to not initialize the pin in the first place.
cpu/nrf52/periph/adc.c
Outdated
*/ | ||
|
||
/** | ||
* @ingroup cpu_nrf52832 |
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.
the group is cpu_nrf52
.
OK, I will split it. |
cool, thx! |
This commit includes now only the board configuration. |
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.
Looking good, untested ACK
boards/acd52832/board.c
Outdated
void board_init(void) | ||
{ | ||
/* initialize the boards LEDs */ | ||
NRF_P0->DIRSET = (LED0_MASK); |
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.
IMO this should rather be gpio_init(LED0_PIN, GPIO_OUT);
, or not?
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.
could, but not necessarily. as the 'native' pin init is a 1-liner here, so why hassle...
boards/acd52832/board.c
Outdated
{ | ||
/* initialize the boards LEDs */ | ||
NRF_P0->DIRSET = (LED0_MASK); | ||
NRF_P0->OUTSET = (LED0_MASK); |
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.
and hence this gpis_clear(LED0_PIN);
, if needed at all?
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.
actually it would be gpio_set()
but could also be LED0_OFF
boards/acd52832/board.c
Outdated
NRF_P0->OUTSET = (LED0_MASK); | ||
|
||
/* initialize the CPU */ | ||
cpu_init(); |
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.
most boards init cpu first, and LED(s) second but that may not matter that much, just for consistency
* @{ | ||
*/ | ||
#define UART_NUMOF (1U) | ||
#define UART_PIN_RX GPIO_PIN(0,30) |
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.
space after ,
here and below
examples/default/Makefile
Outdated
microbit native nrf51dongle nrf52dk nrf6310 openmote-cc2538 pba-d-01-kw2x \ | ||
pca10000 pca10005 remote-pa remote-reva saml21-xpro samr21-xpro \ | ||
spark-core telosb yunjia-nrf51822 z1 | ||
microbit native nrf51dongle nrf52dk nrf6310 acd52832 openmote-cc2538 \ |
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 list is lexicographically sorted, hence acd52832
should be in pole position 😄 though it might be based on NRFxy and hence related to nrf6310
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.
👍
please rebase, fix issue with |
Closing in favor of #8035 |
This PR includes the configuration for the aconno board acd52832.