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

modem: uart interface does not disable TX interrupt in ISR #40371

Closed
JordanYates opened this issue Nov 15, 2021 · 4 comments
Closed

modem: uart interface does not disable TX interrupt in ISR #40371

JordanYates opened this issue Nov 15, 2021 · 4 comments
Assignees
Labels
area: Modem area: Networking area: Wi-Fi Wi-Fi bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug Stale

Comments

@JordanYates
Copy link
Collaborator

Describe the bug

The UART ISR handler modem_iface_uart_isr in modem_iface_uart.c does not disable the TX interrupt when executed.
For the uart_nrfx_uarte serial driver at least, this results in the UARTE ISR permanently triggering after the end of the first transmission.
This locks up the system.

To Reproduce

Place an esp-at device on a UARTE port and attempt to run the samples/net/wifi sample.

&uart0 {
	compatible = "nordic,nrf-uarte";
	current-speed = <115200>;
	status = "okay";
	tx-pin = <34>;
	rx-pin = <33>;
	rts-pin = <40>;
	cts-pin = <7>;

	esp32e16 {
		compatible = "espressif,esp-at";
		label = "esp32e16";
		status = "okay";
	};
};

By default, the application will not reach the boot banner.
Adding the following lines to the bottom of modem_iface_uart_isr resolves this issue:

	/* Disable the TX interrupt once tranmission is complete */
	if (uart_irq_tx_complete(ctx->iface.dev)) {
		uart_irq_tx_disable(ctx->iface.dev);
	}

Expected behavior
The interrupt should not be permanently triggered.

Impact
Applications fail to boot.

Environment (please complete the following information):

  • Zephyr v2.7.0
@JordanYates JordanYates added bug The issue is a bug, or the PR is fixing a bug area: Networking area: Wi-Fi Wi-Fi area: Modem labels Nov 15, 2021
@cfriedt cfriedt added the priority: low Low impact/importance bug label Nov 16, 2021
@carlescufi
Copy link
Member

@rerickson1 could you please take a look and send a PR if appropriate?

@rerickson1
Copy link
Member

@rerickson1 could you please take a look and send a PR if appropriate?

I could submit a PR but have no way of testing this. @JordanYates could you submit a PR with your requested change?

@JordanYates
Copy link
Collaborator Author

I could submit a PR but have no way of testing this. @JordanYates could you submit a PR with your requested change?

Done

@github-actions
Copy link

github-actions bot commented Apr 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Modem area: Networking area: Wi-Fi Wi-Fi bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug Stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants