Skip to content

boards/nucleo-l073: initial support#6433

Merged
kYc0o merged 7 commits intoRIOT-OS:masterfrom
aabadie:nucleo_l073
Feb 28, 2017
Merged

boards/nucleo-l073: initial support#6433
kYc0o merged 7 commits intoRIOT-OS:masterfrom
aabadie:nucleo_l073

Conversation

@aabadie
Copy link
Copy Markdown
Contributor

@aabadie aabadie commented Jan 19, 2017

But doesn't work => don't try it

It adds the new stm32l0 cpu family without MPU enabled. I couldn't make it work and now I cannot flash the board anymore, openocd return an interesting message:

adapter speed: 300 kHz
adapter_nsrst_delay: 100
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
none separate
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Info : Unable to match requested speed 300 kHz, using 240 kHz
Info : Unable to match requested speed 300 kHz, using 240 kHz
Info : clock speed 240 kHz
Info : STLINK v2 JTAG v24 API v2 SWIM v11 VID 0x0483 PID 0x374B
Info : using stlink api v2
Info : Target voltage: 3.221340
Error: init mode failed (unable to connect to the target)
in procedure 'init' 
in procedure 'ocd_bouncer'

@astralien3000, are you interested to have a look ?

@cgundogan cgundogan added the Platform: ARM Platform: This PR/issue effects ARM-based platforms label Jan 19, 2017
@aabadie aabadie added the State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet label Jan 19, 2017
@aabadie aabadie force-pushed the nucleo_l073 branch 3 times, most recently from 81f7fc3 to cddeb66 Compare February 13, 2017 15:06
@PeterKietzmann PeterKietzmann added the Community: Hack'n'ACK candidate This PR is a candidate for review and discussion during one of RIOT's monthly Hack'n'ACK parties label Feb 16, 2017
@aabadie aabadie removed the State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet label Feb 17, 2017
@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Feb 17, 2017

I removed the WIP label as I could get the UART working... but other important things are still broken and I need some help.
I flashed and run some tests and applications and had the following errors:

  • example/default: cannot toggle the board led with saul. This is because the gpio driver doesn't work and I couldn't find a way to make it work. I could still somehow toggle the board LED (PA5) manually with the following code:
RCC->IOPENR = RCC_IOPENR_GPIOAEN;
GPIOA->MODER |= (1 << 10);
LED0_TOGGLE;
  • tests/periph_timer: leads to a kernel panic. Here's the output:
2017-02-17 17:00:44,726 - INFO # Available timers: 1
2017-02-17 17:00:44,726 - INFO # 
2017-02-17 17:00:44,728 - INFO # Testing TIMER_0:
2017-02-17 17:00:44,731 - INFO # TIMER_0: initialization successful
2017-02-17 17:00:44,733 - INFO # TIMER_0: stopped
2017-02-17 17:00:44,735 - INFO # TIMER_0: set channel 0 to 5000
2017-02-17 17:00:44,738 - INFO # TIMER_0: set channel 1 to 10000
2017-02-17 17:00:44,741 - INFO # TIMER_0: set channel 2 to 15000
2017-02-17 17:00:44,745 - INFO # TIMER_0: set channel 3 to 20000
2017-02-17 17:00:44,746 - INFO # TIMER_0: starting
2017-02-17 17:00:44,753 - INFO # *** RIOT kernel panic:
2017-02-17 17:00:44,754 - INFO # DUMMY HANDLER

Any help from the ST experts would be very appreciated ;)
I can also provide more information if needed.

@aabadie aabadie added the Type: new feature The issue requests / The PR implemements a new feature for RIOT label Feb 17, 2017
@aabadie aabadie force-pushed the nucleo_l073 branch 3 times, most recently from 266d6d0 to aed0cbb Compare February 19, 2017 19:04
@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Feb 19, 2017

Small update: the GPIO are now working. I still have the problem with the timer peripheral.

@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Feb 19, 2017

Update: timer and pwm fixed. The timer error was due to the timer being mapped on the wrong isr function...

@lebrush lebrush added the CI: needs squashing Commits in this PR need to be squashed; If set, CI systems will mark this PR as unmergable label Feb 21, 2017
@lebrush
Copy link
Copy Markdown
Member

lebrush commented Feb 21, 2017

I've a L073 laying around. I'll give it a try today or tomorrow

@lebrush lebrush self-assigned this Feb 21, 2017
@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Feb 21, 2017

I've a L073 laying around. I'll give it a try today or tomorrow

Thanks !
Just to let you know, the xtimer tests are still failing and configured PWM doesn't work, I have no idea why. It can be a timer periph implementation/configuration issue.

@lebrush
Copy link
Copy Markdown
Member

lebrush commented Feb 21, 2017

I quickly ran some of the examples:

  • hello_world OK
  • ipc_pingpong OK
  • timer_periodic_wakeup HANGS

So I guess, as you said there must be a missing configuration in the timer...

@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Feb 24, 2017

@lebrush, I fixed the xtimer, there was a missing configuration of the timer width in board.h. Now the board is working really well : I also tested the PWM and UARTs with success.
btw, I don't think this PR needs squasing => all commits are touching different parts of the code (it seems to be one of the valid rules of commiting in RIOT).

@aabadie aabadie added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: needs squashing Commits in this PR need to be squashed; If set, CI systems will mark this PR as unmergable labels Feb 24, 2017
@lebrush
Copy link
Copy Markdown
Member

lebrush commented Feb 24, 2017 via email

@astralien3000
Copy link
Copy Markdown
Member

Tested :

  • examples/hello_world : OK
  • examples/default (saul LED+BUTTON) : OK
  • tests/periph_uart : OK
  • tests/periph_timer : OK
  • tests/periph_pwm : The LEDS are slightly blinking, but not oscillating...
  • tests/xtimer_msg : NOT WORKING
  • tests/xtimer_usleep : NOT WORKING

@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Feb 28, 2017

@astralien3000, strange. Are you sure you have the last branch ? Last commit should be 3f3ec10

@astralien3000
Copy link
Copy Markdown
Member

astralien3000 commented Feb 28, 2017

Sorry, I though I was updated... so :

  • examples/hello_world : OK
  • examples/default (saul LED+BUTTON) : OK
  • tests/periph_uart : OK
  • tests/periph_timer : OK
  • tests/periph_pwm : OK
  • tests/xtimer_msg : OK
  • tests/xtimer_usleep : OK

Everything is OK for me !

@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Feb 28, 2017

A code is missing here. Anyone interested ? @kYc0o , @PeterKietzmann ?

Copy link
Copy Markdown
Contributor

@kYc0o kYc0o left a comment

Choose a reason for hiding this comment

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

ACK

@kYc0o kYc0o merged commit 29753d6 into RIOT-OS:master Feb 28, 2017
@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Feb 28, 2017

Yeah !

@aabadie aabadie deleted the nucleo_l073 branch March 6, 2017 11:59
@aabadie aabadie added this to the Release 2017.04 milestone Mar 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Community: Hack'n'ACK candidate This PR is a candidate for review and discussion during one of RIOT's monthly Hack'n'ACK parties 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.

6 participants