-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Nrf52 uart io #1212
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
Nrf52 uart io #1212
Conversation
travis translation build failed is probably caused by this line @dhalbert @tannewt can you suggest which message/error type that we should raise here |
@hathach RuntimeError is fine. You'll just need to run |
@tannewt ah thanks, I dont know that. Do you know any string that I could re-use without introducing a new one. I tried to search but couldn't find one. |
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.
Thanks! And thanks for the extensive testing. If you are too busy to make these few changes, I can accept as is and make the changes myself later.
ports/nrf/common-hal/busio/UART.c
Outdated
const mcu_pin_obj_t * tx, const mcu_pin_obj_t * rx, uint32_t baudrate, | ||
uint8_t bits, uart_parity_t parity, uint8_t stop, uint32_t timeout, | ||
uint8_t receiver_buffer_size) { | ||
mp_raise_NotImplementedError(translate("busio.UART not yet implemented")); |
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 think these should all be "not available" instead of "not yet implemented", because on the nRF52832 there will never be another UART instance, 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.
ah right, I will change it and update the new string
ports/nrf/common-hal/busio/UART.c
Outdated
} | ||
|
||
void common_hal_busio_uart_clear_rx_buffer(busio_uart_obj_t *self) { | ||
|
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.
Is it possible to discard the already DMA'd characters? That's what we want to do 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.
yeah, I forgot to implement this :D
I merged some translation PR's in and it broke your build - sorry. If you could just merge or rebase from master, I think it will be fine. |
No problem, just push the new one. |
I resolved the remaining minor translation conflicts via github.com. Thanks! |
use uarte for uart io for nrf52840. skip tx/rx_abort() else we will run into missing bytes.
change serial() on nrf52832 from uart to uarte as well.
Never got into that much of troubles with UART prph :(
Note: also update nrfx to 1.3.0 since they fixed a bug with uarte driver as well.
#1039