Skip to content

boards: add initial support for ST b-l475e-iot01a#7584

Merged
kaspar030 merged 2 commits intoRIOT-OS:masterfrom
aabadie:b-l475e-iot01a
Dec 15, 2017
Merged

boards: add initial support for ST b-l475e-iot01a#7584
kaspar030 merged 2 commits intoRIOT-OS:masterfrom
aabadie:b-l475e-iot01a

Conversation

@aabadie
Copy link
Copy Markdown
Contributor

@aabadie aabadie commented Sep 8, 2017

Board datasheet is here, detailed pdf is here.

This board is very interesting for IoT:

  • it is low power: uses a STM32L475VG mcu
  • it embeds lots of radio devices: WiFi, BLE, NFC and LoRa
  • it embeds lots of sensors: microphone (MP34DT01), temperature/humidy(HTS221), magnetometer (LIS3MDL), accelerometer (LSM6DSL), pressure (LPS22HB), TOF ranging (VL53L0X)
  • it's arduino pinout compatible (not very important though)

I'll create an issue to keep track of the remaining things to do to fully support it.

Thanks to @kYc0o who pointed me to it :)

@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 CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Sep 8, 2017
@aabadie aabadie added this to the Release 2017.10 milestone Sep 8, 2017
@jnohlgard
Copy link
Copy Markdown
Member

That's a lot of connectivity options on one board.

@aabadie aabadie force-pushed the b-l475e-iot01a branch 3 times, most recently from 9ae9325 to 637ef5e Compare September 8, 2017 11:15
@aabadie aabadie added Area: boards Area: Board ports Area: LoRa Area: LoRa radio support labels Oct 13, 2017
@kYc0o kYc0o mentioned this pull request Oct 29, 2017
23 tasks
@kYc0o kYc0o removed this from the Release 2017.10 milestone Oct 30, 2017
@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Nov 15, 2017

I received some gifts today with 2 of these boards in :)

Just tested it and this PR seems to work: I could play with the shell and on-board LEDs. I need to go further in testing and also rebase.

@aabadie aabadie force-pushed the b-l475e-iot01a branch 2 times, most recently from a309758 to c5b9575 Compare November 17, 2017 10:43
@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Nov 17, 2017

The initial port was not that bad. I tested configured uart, timer, rtc, rtt with success.

Maybe @astralien3000 you can test the configured PWMs ?

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.

Minor remarks, else looks good.

But I'd say the discussion from #8058 applies here as well -> 90% of the lines in this PR are duplicates of existing code. But I am unsure we want to go ahead as is (and cleaup later), or if we want to wait merging this PR until some more clear structure for code sharing is agreed upon.

@@ -0,0 +1,13 @@
## the cpu to build for
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.

extra # char?!

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

cpu_init();

/* initialize the boards LED */
#ifdef AUTO_INIT_LED0
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.

just to make sure: is this also the case on this board or is this just a copy/paste error from the nucleo code?

Copy link
Copy Markdown
Contributor Author

@aabadie aabadie Nov 17, 2017

Choose a reason for hiding this comment

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

It's also the case on this board => same pin for LED_0 and SPI_0 clock

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.

is this just a copy/paste error from the nucleo code?

hopefully all my code is not only copy paste

@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Nov 17, 2017

the discussion from #8058 applies here as well -> 90% of the lines in this PR are duplicates of existing code

I know, that's why I'm very much in favour of the proposed solutions there (whichever is chosen). See my comment talking about the introduction of a boards/common/stm directory that also goes in that direction.

The board here and others from ST are sharing a lot of things (Arduino compatible pinout, ST-Link, etc)

@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Nov 17, 2017

I would also like to have #7799 merged soon and rebase on it after

@kYc0o
Copy link
Copy Markdown
Contributor

kYc0o commented Nov 17, 2017

The board here and others from ST are sharing a lot of things (Arduino compatible pinout, ST-Link, etc)

Take a look at #7686 to adapt the debugger.

@astralien3000
Copy link
Copy Markdown
Member

astralien3000 commented Nov 20, 2017

Saul SENSE_BTN does not seem to work.

EDIT: it's C13 instead of B2

@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Nov 20, 2017

it's C13 instead of B2

Thanks for having a look @astralien3000 ! Will fix

@astralien3000
Copy link
Copy Markdown
Member

I also tested PWMs, D9 is working, but not D5 and D6.
TIM3 is 16-bits instead of 32-bit for TIM2 (datasheet p45), maybe the problem comes from there ?

@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Nov 20, 2017

@astralien3000, I fixed the wrong pin definitions and removed the 2 PWM that doesn't work as it seems to be a more general driver issue (not being able to change the timer width).

@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Nov 20, 2017

@kYc0o, I addressed your comment regarding the debugger configuration. Still works !

@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Dec 1, 2017

@kYc0o, now that #7799 is merged, I rebased this PR and remove the ld script. Just tested and it still works.

@aabadie aabadie removed the Area: LoRa Area: LoRa radio support label Dec 7, 2017
@aabadie aabadie force-pushed the b-l475e-iot01a branch 3 times, most recently from b61f0e0 to cda7355 Compare December 11, 2017 07:57
@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Dec 11, 2017

@haukepetersen, @kYc0o, I think we are good with this one. I tested it again locally and it's still working.

FEATURES_PROVIDED += periph_timer
FEATURES_PROVIDED += periph_uart

# Load extra provided features
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.

remove this, cpp is provided by cortex-m

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.

Done

@aabadie aabadie force-pushed the b-l475e-iot01a branch 2 times, most recently from b8386b9 to 1fd4ef1 Compare December 15, 2017 10:15
@fernandoavita
Copy link
Copy Markdown

The LED1 macros are not working due to a typo in the board.h file. They are defined with LED0_MASK instead of LED1_MASK.

Thanks adding support to this board! I would like to learn RIOT and I'm with this board in hands.

@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Dec 15, 2017

The LED1 macros are not working due to a typo in the board.h file

Thanks for reporting @fernandoavita. I just pushed the fixed configuration. Can you test again ?

@fernandoavita
Copy link
Copy Markdown

I just pushed the fixed configuration. Can you test again ?

Sure! Now they are working. Thanks @aabadie!

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

@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Dec 15, 2017

@kaspar030 ? (now that your github notifications are fixed :) )

@kaspar030 kaspar030 merged commit 3738704 into RIOT-OS:master Dec 15, 2017
@aabadie aabadie deleted the b-l475e-iot01a branch June 8, 2018 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: boards Area: Board ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ARM Platform: This PR/issue effects ARM-based platforms 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.

7 participants