Skip to content

cpu/atmega2560: reworked UART (from #5026)#5537

Merged
kYc0o merged 5 commits intoRIOT-OS:masterfrom
kYc0o:reworked_uart_wfix
Jun 19, 2016
Merged

cpu/atmega2560: reworked UART (from #5026)#5537
kYc0o merged 5 commits intoRIOT-OS:masterfrom
kYc0o:reworked_uart_wfix

Conversation

@kYc0o
Copy link
Copy Markdown
Contributor

@kYc0o kYc0o commented Jun 9, 2016

Takes #5026 and adds small fixes.

@kYc0o kYc0o added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer Platform: AVR Platform: This PR/issue effects AVR-based platforms labels Jun 9, 2016
@kYc0o kYc0o added this to the Release 2016.07 milestone Jun 9, 2016
@kYc0o kYc0o force-pushed the reworked_uart_wfix branch from 71f0784 to 7f0a1a7 Compare June 9, 2016 13:52
@Kijewski Kijewski changed the title cpu/atmega2560: rewoked UART (from #5026) cpu/atmega2560: reworked UART (from #5026) Jun 9, 2016
@kYc0o
Copy link
Copy Markdown
Contributor Author

kYc0o commented Jun 16, 2016

@aabadie today it's gonna be the day? ;)

@@ -1,5 +1,6 @@
/*
* Copyright (C) 2014 Freie Universität Berlin, Hinnerk van Bruinehsen
* Copyright (C) 2014-2016 Freie Universität Berlin
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.

@kYc0o is that copyright correct? (shouldn't INRIA?)

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.

Actually this code comes from Hauke, I didn't modify anything on this so I think is ok

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.

ok, perfect! :)

@aabadie
Copy link
Copy Markdown
Contributor

aabadie commented Jun 16, 2016

@kYc0o, code changes looks good to me but I don't have a mega2560 for testing.

@kYc0o
Copy link
Copy Markdown
Contributor Author

kYc0o commented Jun 16, 2016

@adjih doesn't have one? Or @jia200x ?

@kaspar030
Copy link
Copy Markdown
Contributor

Ive got one but little time. would basic shell testing confirm that this is working?

-----Original Message-----
From: kYc0o [email protected]
To: RIOT-OS/RIOT [email protected]
Cc: Kaspar Schleiser [email protected], Comment [email protected]
Sent: Do., 16 Juni 2016 17:06
Subject: Re: [RIOT-OS/RIOT] cpu/atmega2560: reworked UART (from #5026) (#5537)

@adjih doesn't have one? Or @jia200x ?


You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#5537 (comment)

@kYc0o
Copy link
Copy Markdown
Contributor Author

kYc0o commented Jun 16, 2016

Somehow yes, but of you can run the test 'periph_uart' and check for the second uart it would be ok

@aabadie
Copy link
Copy Markdown
Contributor

aabadie commented Jun 16, 2016

@kYc0o, yes @adjih have some but they are used in custom setup for IoT-Lab.

@aabadie
Copy link
Copy Markdown
Contributor

aabadie commented Jun 17, 2016

@kYc0o, I just gave it a try. The UART0 works.

But I tried to configure another UART and didn't succeed. I based my work by simply adding the bare minimum for UART communication in the hello example:

  • in the Makefile, I added:
USEMODULE += xtimer
USEMODULE += periph_uart  # should be FEATURES_REQUIRED += periph_uart
  • in the main.c, I added:
#include "periph/uart.h"
#include "xtimer.h"

and, after the initial printf:

uart_init(2, 115200, NULL, (void*)NULL);
    for (;;) {
        uart_write(2, (uint8_t*)"test\n", 5);
        xtimer_sleep(1);
    }

but then the build fails with the error:

avr-gcc: error: <path_to_src>/RIOT/examples/hello-world/bin/arduino-mega2560/periph_uart.a: No such file or directory
<path_to_src>/RIOT/Makefile.include:259: recipe for target 'all' failed
make: *** [all] Error 1

Is it me or is there something broken ? Do all UARTs be supported on this board ?

@aabadie
Copy link
Copy Markdown
Contributor

aabadie commented Jun 17, 2016

Ok, actually it was me, sorry 😕
I used the wrong Makefile option for periph_uart... (it should be FEATURES_REQUIRED)...

So for me it works like a charm.

ACK

@kYc0o
Copy link
Copy Markdown
Contributor Author

kYc0o commented Jun 17, 2016

@aabadie can you put the flag "ready for ci" to make murdock work?

@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 Jun 17, 2016
@kYc0o
Copy link
Copy Markdown
Contributor Author

kYc0o commented Jun 19, 2016

I saw some ACK so go!

@kYc0o kYc0o merged commit 2adf76c into RIOT-OS:master Jun 19, 2016
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 Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer Platform: AVR Platform: This PR/issue effects AVR-based platforms Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants