Skip to content

boards/sodaq-explorer: add initial support#7725

Merged
smlng merged 3 commits intoRIOT-OS:masterfrom
aabadie:board/lorawan-explorer
Oct 13, 2017
Merged

boards/sodaq-explorer: add initial support#7725
smlng merged 3 commits intoRIOT-OS:masterfrom
aabadie:board/lorawan-explorer

Conversation

@aabadie
Copy link
Copy Markdown
Contributor

@aabadie aabadie commented Oct 12, 2017

This PR adds a basic support for the Sodaq LoRaWAN ExpLoRer kit board.

What has been tested with success:

  • UARTs
  • GPIOs via SAUL (on-board LED and button)
  • RTT with tests/periph_rtt
  • RTC with tests/periph_rtc
  • ADC with tests/periph_adc

I2C and SPI have not been tested.

Since no PWM is defined, this PR relies on #7724

@aabadie aabadie added Platform: ARM Platform: This PR/issue effects ARM-based platforms Type: new feature The issue requests / The PR implemements a new feature for RIOT labels Oct 12, 2017
@aabadie aabadie added this to the Release 2017.10 milestone Oct 12, 2017
@keestux
Copy link
Copy Markdown
Contributor

keestux commented Oct 12, 2017

Nice. This is the SODAQ ExpLoRer.
Wow, I didn't know we could use the default bootloader and burn via bossac. Great.

Copy link
Copy Markdown
Contributor

@keestux keestux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK. Thanks for doing this.

@@ -0,0 +1,20 @@
# define the cpu used by Arduino/Genuino MKR1000 board
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be SODAQ ExpLoRer, I guess.

Copy link
Copy Markdown
Member

@smlng smlng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO the board is rather recognise as the SODAQ ExpLoRer hence we should usesodaq-explorer as the official board name, otherwise it might not be recognised by others.

@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Oct 12, 2017

This is the SODAQ ExpLoRer.

I was unsure of what was the best, I'll change that

#define LED0_PORT PORT->Group[PA]
#define LED0_MASK (1 << 21)

#define LED0_ON (LED0_PORT.OUTSET.reg = LED0_MASK)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure but shouldn't these rather use |=?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nevermind, found that other boards of that cpu (family) use it the same.

@smlng
Copy link
Copy Markdown
Member

smlng commented Oct 12, 2017

@aabadie, regarding the board name: I prefer sodaq-explorer, basically looks like 1:1 here - but as @keestux also used that name twice above, there is kind of a trend 😉 If you agree, too, I suggest to go for sodaq-explorer.

Looks like a nice board with good online docu!

@aabadie aabadie force-pushed the board/lorawan-explorer branch from d302163 to 23fccf8 Compare October 12, 2017 20:30
@aabadie aabadie changed the title boards/lorawan-explorer: add initial support boards/sodaq-explorer: add initial support Oct 12, 2017
@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Oct 12, 2017

Just made the change @smlng @keestux and extended a bit the documentation

@aabadie aabadie added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Oct 12, 2017
@aabadie aabadie force-pushed the board/lorawan-explorer branch 2 times, most recently from f2e6632 to d6cba4c Compare October 12, 2017 20:51
@aabadie aabadie force-pushed the board/lorawan-explorer branch from d6cba4c to 99095b5 Compare October 13, 2017 06:30
@aabadie aabadie added Area: boards Area: Board ports Area: LoRa Area: LoRa radio support labels Oct 13, 2017
Copy link
Copy Markdown
Contributor

@haukepetersen haukepetersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! Just two minor remarks.

*
* ### Accessing STDIO via UART
*
* To access the STDIO of RIOT, a FTDI to USB converted needs to be plugged to
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/converted/converter/?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

{
.name = "LED",
.pin = LED0_PIN,
.mode = GPIO_OUT
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it make sense to adapt this also to #7586 (setting polarity and initial state) from the start?!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not for the LED since it's not inverted. I changed that for the button

@haukepetersen
Copy link
Copy Markdown
Contributor

Also, #7724 is merged, so you can rebase :-)

@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Oct 13, 2017

@haukepetersen, comments addressed and branch rebased

Copy link
Copy Markdown
Contributor

@haukepetersen haukepetersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@haukepetersen
Copy link
Copy Markdown
Contributor

oh, for completeness: the ACK is untested as I don't have the hw...

@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Oct 13, 2017

I have to remove this board from the unittests, Murdock is failing because of this

@aabadie aabadie force-pushed the board/lorawan-explorer branch from cc7ff6b to d984cf8 Compare October 13, 2017 12:23
@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Oct 13, 2017

Murdock is finally happy, @smlng do you ACK ?

export LINKER_SCRIPT ?= $(RIOTCPU)/sam0_common/ldscripts/$(CPU_MODEL)_arduino_bootloader.ld
include $(RIOTMAKE)/tools/bossa.inc.mk

INCLUDES += -I$(RIOTBOARD)/lorawan-explorer/include
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missed that, replace /lorawan-explorer/sodaq-explorer/, or even better with $(BOARD) - thought murdock would find such things?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually I think, this isn't needed at all, just for boards that depend on some common includes.

* @{
*
* @file
* @brief Configuration of CPU peripherals for the Sodaq LoRaWAN Explorer board
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit picky, but consistent with other files here would be Configuration of CPU peripherals for the SODAQ ExpLoRer board

#ifdef __cplusplus
extern "C" {
#endif

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with #6702 merge you need to add

/**
 * @name    xtimer configuration
 * @{
 */
#define XTIMER_WIDTH        (16)
/** @} */

or use TIMER1 for xtimer with default with of 32 bits

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kept the 16 bit version

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you run any of the tests/xtimer_* to verify, because this must be tested at runtime, otherwise Murdock would've complained already.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested with xtimer_msg, works well.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx for reporting, ACK then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

xtimer_drift is good test to run for an overall sanity check of the hardware timer. It will show you if the timer is misconfigured, for example running at slower or faster than expected. It should print one message per second if everything is working properly.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran this one as well and had the expected behaviour ;)

@aabadie aabadie force-pushed the board/lorawan-explorer branch from d984cf8 to 316e842 Compare October 13, 2017 15:24
@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Oct 13, 2017

@smlng, comments addressed

Copy link
Copy Markdown
Member

@smlng smlng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

final question before ACK 😉

#ifdef __cplusplus
extern "C" {
#endif

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you run any of the tests/xtimer_* to verify, because this must be tested at runtime, otherwise Murdock would've complained already.

@aabadie aabadie removed the Platform: ARM Platform: This PR/issue effects ARM-based platforms label Oct 13, 2017
@smlng smlng merged commit 7e388b2 into RIOT-OS:master Oct 13, 2017
@aabadie aabadie deleted the board/lorawan-explorer branch February 26, 2018 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: boards Area: Board ports Area: LoRa Area: LoRa radio support CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: new feature The issue requests / The PR implemements a new feature for RIOT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants