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

nrf52840_pca10056: Spurious RTS pulse and incorrect line level with hardware flow control disabled #23052

Closed
carlescufi opened this issue Feb 24, 2020 · 4 comments
Assignees
Labels
area: Debugging area: UART Universal Asynchronous Receiver-Transmitter bug The issue is a bug, or the PR is fixing a bug platform: nRF Nordic nRFx priority: low Low impact/importance bug

Comments

@carlescufi
Copy link
Member

carlescufi commented Feb 24, 2020

When running samples/hello_world with the default configuration on nrf52840_pca10056, CONFIG_UART_0_NRF_FLOW_CONTROL is disabled.

This means that the RTS line, which is an output from the nRF52840 perspective, should stay idle continuously. Instead, we see a pulse, which should not be present.
Furthermore, before and after the pulse the line is set to the low level (active) which makes the J-Link OB firmware believe that hardware flow control is enabled, as described here.

Steps to reproduce:

  • Build samples/hello_world for nrf52840_pca10056
  • Flash the board
  • Run nrfjprog -r
  • Start the protocol analyzer

Additional info:

Note: this is not related to #14753.

@carlescufi carlescufi added area: UART Universal Asynchronous Receiver-Transmitter platform: nRF Nordic nRFx area: Debugging bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug labels Feb 24, 2020
@carlescufi carlescufi changed the title nrf52840_pca10056: Spurious RTS pulse with hardware flow control disabled nrf52840_pca10056: Spurious RTS pulse and incorrect line level with hardware flow control disabled Feb 25, 2020
@github-actions
Copy link

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

@carlescufi
Copy link
Member Author

@anangl did we fix this at all?

@carlescufi carlescufi reopened this Nov 3, 2021
@nashif nashif removed the Stale label Nov 3, 2021
@github-actions
Copy link

github-actions bot commented Jan 3, 2022

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

@github-actions github-actions bot added the Stale label Jan 3, 2022
@anangl anangl removed the Stale label Jan 3, 2022
@anangl
Copy link
Member

anangl commented Feb 14, 2022

There is no bug here, actually. This is how the UART and UARTE peripherals work. As the specification says:

If flow control is not enabled, the interface will behave as if the CTS and RTS lines are kept active all the time.

The driver initially configures the GPIO pin that is to serve as the RTS line to be an output with the high (inactive) level. Shortly after that, this pin number is written into the PSEL.RTS register of the peripheral and the peripheral is enabled. From this moment the peripheral starts driving the pin, and if the hardware flow control is disabled, the pin immediately becomes active. That is why the RTS pulse appears.
I don't think it is worth trying to align with JLink OB firmware expectations regarding the RTS line, so that it could perform its auto-detection of the hardware flow control, as this would mean quite a complication of the driver code (the RTS pin would need to be disconnected from the peripheral when the flow control is not enabled). Hence, I'm closing this issue.

@anangl anangl closed this as completed Feb 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Debugging area: UART Universal Asynchronous Receiver-Transmitter bug The issue is a bug, or the PR is fixing a bug platform: nRF Nordic nRFx priority: low Low impact/importance bug
Projects
None yet
Development

No branches or pull requests

3 participants