Skip to content
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: UARTE lacks pm interface #12501

Closed
tautologyclub opened this issue Jan 15, 2019 · 10 comments
Closed

nRF52: UARTE lacks pm interface #12501

tautologyclub opened this issue Jan 15, 2019 · 10 comments
Assignees
Labels
area: UART Universal Asynchronous Receiver-Transmitter bug The issue is a bug, or the PR is fixing a bug platform: nRF Nordic nRFx priority: medium Medium impact/importance bug

Comments

@tautologyclub
Copy link
Contributor

I noticed that drivers/serial/uart_nrfx_uarte.c doesn't initialize the power management callbacks, but it does for regular UART. However, when inspecting drivers/serial/uart_nrfx_uart.c more closely, you actually catch a bunch of hardcoded references to uart0, which leads me to believe that it's impossible to suspend uart1 under the current API.

Am I missing something here?

@tautologyclub tautologyclub added the bug The issue is a bug, or the PR is fixing a bug label Jan 15, 2019
@tautologyclub
Copy link
Contributor Author

So, if this is actually the case (which it seems like), in my mind it should be assigned very high priority because UART_1 is virtually unusable for nRF52 in its current state. I'd be happy to assist with the fix, but would like Nordic to comment first.

@carlescufi
Copy link
Member

@tautologyclub I think either @jarz-nordic or @pizi-nordic can comment on this

@tautologyclub
Copy link
Contributor Author

Looking at the HAL, it sort of looks like this would be very easy by using

__STATIC_INLINE void nrf_uarte_disable(NRF_UARTE_Type * p_reg)

and getting p_reg from

get_uarte_instance(dev)

from drivers/serial//home/benjamin/repos/zephyr/drivers/serial/uart_nrfx_uarte.c

Is this the general idea?

@jakub-uC
Copy link
Contributor

jakub-uC commented Jan 24, 2019

@tautologyclub : UART and UARTE SHIM has been prepared by me at the same time. I had internall discussion about the approach and we decided that UARTE SHIM is multiinsance while UART SHIM is not.
The reason is quite simple: there is no and there will be no Nordic microcontroller with more than 1 UART instance.
And if by any chance this will change we will update the SHIM.

@jakub-uC
Copy link
Contributor

Regarding power management for UARTE we will try to prepare a fix for that shortly.

@tautologyclub
Copy link
Contributor Author

@jarz-nordic Thanks, that's great. Are we talking days, weeks or months?

@jakub-uC
Copy link
Contributor

@tautologyclub : Once new UART API is merged I hope to have it in next 2-3 weeks.

@galak galak added priority: medium Medium impact/importance bug area: UART Universal Asynchronous Receiver-Transmitter platform: nRF Nordic nRFx labels Jan 29, 2019
@tautologyclub
Copy link
Contributor Author

Any news?

@carlescufi
Copy link
Member

@jarz-nordic any update on this?

@carlescufi
Copy link
Member

@tautologyclub #13064

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: UART Universal Asynchronous Receiver-Transmitter bug The issue is a bug, or the PR is fixing a bug platform: nRF Nordic nRFx priority: medium Medium impact/importance bug
Projects
None yet
Development

No branches or pull requests

5 participants