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

STM32, suspected executor hang using w5500 (SPI) + two UARTS and I2c #2968

Closed
dvdsk opened this issue May 20, 2024 · 1 comment
Closed

STM32, suspected executor hang using w5500 (SPI) + two UARTS and I2c #2968

dvdsk opened this issue May 20, 2024 · 1 comment

Comments

@dvdsk
Copy link
Contributor

dvdsk commented May 20, 2024

Hi all I need some debugging tips.

I have build an stm32 based sensor node that reads environmental sensors and
sends the data over ethernet using a w5500. Unfortunately it starts hanging
after a while.

I am at a loss to what is causing this. I have tried and failed to make a
minimal example. I suspect something might be going wrong with executor. To
check that I added an interrupt task that does nothing except print a message
every second. When the program hangs the interrupt task hangs too.

I can not find where the it hangs, I do know that:
- If I remove the w5500 runner and stack tasks the program works again.
- If I remove one of the UART sensors (sps30 or mhz) the program works
again.
- If I add Timer::after calls here and there it takes longer before it hangs
(up to about 30 minutes)
- Removing a yield statement before the join (that polls the sensors
measuring) makes the code more reliable. (stops it from breaking 11.4
seconds after starting)

To me it sounds like running the w5500 and 2 UARTS together breaks the executor.
Could this be a manifestation of:

I am no embedded engineer and I'am out of my depth here. I would love advise on
how to proceed.

Ps: a few more details

@dvdsk
Copy link
Contributor Author

dvdsk commented Jun 8, 2024

Same cause as #3048 ran out of memory which triggered a bus-fault, the fault handler was a simple loop .

@dvdsk dvdsk closed this as completed Jun 8, 2024
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

1 participant