-
Notifications
You must be signed in to change notification settings - Fork 2k
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
fe310: xtimer hardfault #13109
Comments
@MichelRottleuthner @Hyungsin any ideas? |
No idea out of my head. I'll try to see If I can get access to such a board to reproduce it. |
BTW I do not think this is an an issue with |
Yeah but we should still find it, and if xtimer can reliably trigger it thats kind of good^^ |
unfortunately looks like we don't have one here :/ |
I can provide access via ssh, to a hifive1b connected to a raspi, if that helps. |
Using make debug, the origin of the failure is: Line 71 in cd3f1b8
According the FE310-G002 reference manual, |
I've tried to close in on the issue. This minimal application also triggers the bug:
Makefile:
I've tried to mimic the pure periph_timer usage using variations of this:
... but that works fine. Unfortunately the debugging using JLink is not perfect on the hifive1b. It looks though as if the crash happens right after trap return (right after "mret" in cpu/fe310/intr.S:114). My RISC-V-fu is not the best, any ideas? |
This is timing dependent. I tried to figure out why this does not crash when stopping here using the debugger: "(right after "mret" in cpu/fe310/intr.S:114)". Turns out this patch prevents the crash:
The value So it seems like when using xtimer, the timer interrupt machinery fails unless the timer triggers before return from xtimer's ISR. weird. |
Description
#9530 introduced a hardfault when using
xtimer
onfe310
, I had seen it while testing but had attributed it to issues I was having with my setup.Originally posted by @fjmolinas in #9530 (comment)
When I performed the final round of testing this board was not connected, so was not part of it. So this slipped by.
Although
hifive1b
runs on a 32Khz timer, I don't think this is the issue, its the same forfrdm-kw41z
and there is no issue.Steps to reproduce the issue
Flash any application using
xtimer
onhifive1b
.Expected results
No crash.
Actual results
Hardfaults;
Versions
The text was updated successfully, but these errors were encountered: