Skip to content

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

Merged
merged 28 commits into from
Oct 4, 2018
Merged

Nrf52 uart io #1212

merged 28 commits into from
Oct 4, 2018

Conversation

hathach
Copy link
Member

@hathach hathach commented Sep 25, 2018

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

@hathach
Copy link
Member Author

hathach commented Sep 25, 2018

travis translation build failed is probably caused by this line
https://github.com/hathach/circuitpython/blob/nrf52_uart_io/ports/nrf/common-hal/busio/UART.c#L48

@dhalbert @tannewt can you suggest which message/error type that we should raise here

@tannewt
Copy link
Member

tannewt commented Sep 25, 2018

@hathach RuntimeError is fine.

You'll just need to run make translate to update the .po files with your new strings.

@hathach
Copy link
Member Author

hathach commented Sep 25, 2018

@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.

Copy link
Collaborator

@dhalbert dhalbert left a 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.

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"));
Copy link
Collaborator

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?

Copy link
Member Author

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

}

void common_hal_busio_uart_clear_rx_buffer(busio_uart_obj_t *self) {

Copy link
Collaborator

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.

Copy link
Member Author

@hathach hathach Oct 3, 2018

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

@dhalbert
Copy link
Collaborator

dhalbert commented Oct 3, 2018

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.

@hathach
Copy link
Member Author

hathach commented Oct 3, 2018

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.

@dhalbert
Copy link
Collaborator

dhalbert commented Oct 3, 2018

I resolved the remaining minor translation conflicts via github.com. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants