-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cpu, cc2538: adapt periph uart to GPIO API #7310
Conversation
|
e3158c6
to
dc7654c
Compare
rebased |
b63a964
to
65876b6
Compare
65876b6
to
99d1a40
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks good. I have found nothing.
99d1a40
to
b41b469
Compare
1e8e0d9
to
e0ff9ba
Compare
2964321
to
9c22b13
Compare
9c22b13
to
04e6df7
Compare
rebased |
@@ -26,29 +26,12 @@ | |||
#include "cc2538_gpio.h" | |||
#include "periph_cpu.h" | |||
#include "periph_common.h" | |||
#include "periph/gpio.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so, might be an artefact from rebasing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor things to clarify. Besides I've succesfully tested on remote-reva/b.
#define UART_0_TX_PIN GPIO_PIN(0, 1) /**< GPIO_PA1 */ | ||
#define UART_0_RX_PIN GPIO_PIN(0, 0) /**< GPIO_PA0 */ | ||
#define UART_0_RTS_PIN GPIO_PIN(3, 3) /**< GPIO_PD3 */ | ||
#define UART_0_CTS_PIN GPIO_PIN(1, 0) /**< GPIO_PB0 */ | ||
|
||
/* UART 1 device configuration */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any ideas why this half-done configuration is here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope no idea, I mean the cc2538 has 2 UARTS, but I'm not sure if both are accessible on the DK version - but should be, I'll check and maybe add the correct pin config - with RTS CTS then.
#define UART_0_CTS_PIN GPIO_PB0 | ||
#define UART_0_TX_PIN GPIO_PIN(0, 1) /**< GPIO_PA1 */ | ||
#define UART_0_RX_PIN GPIO_PIN(0, 0) /**< GPIO_PA0 */ | ||
#define UART_0_RTS_PIN GPIO_PIN(3, 3) /**< GPIO_PD3 */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the driver implementation below it is written /* On the CC2538, hardware flow control is supported only on UART1 */
and that is also what the code represents. UART_0
however, maps to UART0
here. I'm sorry, obviously this was not intendet to fix with this PR, but could you clarify this please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I admit I just adapted to use GPIO_PIN
without questioning the general config, nor consulting the data sheet on that matter. So you mean RTS and CTS pins should be removed, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops, accidentally hit approve before
Hi guys, I was just wondering if there's any movement on this? I'm changing cpu/cc2538/periph/uart.c for issue #7941 and would be good to avoid merge conflicts. I will probably be submitting a PR for this in the next few days. I could work around your changes i.e. leave the functionality you moved to the GPIO driver alone, but would be neater to merge this first if possible I think |
I'll rebase to resolve conflicts, otherwise this needs approval to be merged. |
@PeterKietzmann was wondering if there would be any chance of doing this sometime in the near future? :) |
04e6df7
to
a4274eb
Compare
rebased |
Will have an other look this afternoon |
Thx guys |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested again (on a remote-revb this time) and STDIO works as expected. ACK for this change, even though my concerns about the hardware flow control configuration have not been addressed. But this is an other issue.
this PR adapts low-level UART driver of TI CC2538 to use RIOTs GPIO API.
Its part of adaption to solve #6650, next steps are to rework I2C and SPI, too.