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

wfi instruction unsupported / broken #131

Open
m42uko opened this issue Aug 2, 2024 · 1 comment
Open

wfi instruction unsupported / broken #131

m42uko opened this issue Aug 2, 2024 · 1 comment

Comments

@m42uko
Copy link
Contributor

m42uko commented Aug 2, 2024

Zephyr 3.6.0 introduces the use of wfi when waiting for interrupts (5fb6e267f629dedb8382da6bcad8018b1bb8930a). Executing this instructions breaks things for us.

How to reproduce?

Run the following example program (based on hello_world) on Zephyr >= 3.6.0:

#include <stdio.h>
#include <zephyr/kernel.h>

int main(void)
{
	int i=0;
	while (1) {
		printf("Hello World! %s %d\n", CONFIG_BOARD_TARGET, i++);
		k_msleep(1000);
	}
	return 0;
}

Observed behavior

Hello World is printed once, then the application locks up. Not even the interrupt handler in the timer driver is ever called again.

Expected behavior

Hello Word is printed every 1 second.

@m42uko m42uko changed the title wfi instructions unsupported / broken wfi instruction unsupported / broken Aug 2, 2024
@olofk
Copy link
Owner

olofk commented Aug 2, 2024

Ok, that's not good. It's a bit surprising that they didn't make WFI support optional in Zephyr. Either way, I think that we should short-term fix SERV to treat WFI as a nop and long term add proper support since it's a highly useful instruction for the kind of deeply embedded use cases that SERV intends to serve.

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

No branches or pull requests

2 participants