boards: add acd52832/nrf52832#7501
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. |
haukepetersen
left a comment
There was a problem hiding this comment.
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.
indention is off by two spaces
There was a problem hiding this comment.
also: the line above is duplicated...
There was a problem hiding this comment.
@haukepetersen Taken over from boards/nrf52dk/board.c
There was a problem hiding this comment.
then you can fix that file as well :-)
boards/acd52832/board.c
Outdated
| * @file | ||
| * @brief Board initialization for the nRF52 DK | ||
| * | ||
| * @author Hauke Petersen <[email protected]> |
There was a problem hiding this comment.
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 <[email protected]> | ||
| * @author Sebastian Meiling <[email protected]> |
| static const timer_conf_t timer_config[] = { | ||
| { | ||
| .dev = NRF_TIMER1, | ||
| .channels = 3, |
There was a problem hiding this comment.
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.
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.
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.
the group is cpu_nrf52.
|
OK, I will split it. |
|
cool, thx! |
|
This commit includes now only the board configuration. |
haukepetersen
left a comment
There was a problem hiding this comment.
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.
IMO this should rather be gpio_init(LED0_PIN, GPIO_OUT);, or not?
There was a problem hiding this comment.
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.
and hence this gpis_clear(LED0_PIN);, if needed at all?
There was a problem hiding this comment.
actually it would be gpio_set() but could also be LED0_OFF
| NRF_P0->OUTSET = (LED0_MASK); | ||
|
|
||
| /* initialize the CPU */ | ||
| cpu_init(); |
There was a problem hiding this comment.
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) |
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.
this list is lexicographically sorted, hence acd52832 should be in pole position 😄 though it might be based on NRFxy and hence related to nrf6310
|
please rebase, fix issue with |
|
Closing in favor of #8035 |
This PR includes the configuration for the aconno board acd52832.