-
Notifications
You must be signed in to change notification settings - Fork 6
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
dsp hangs RedPitaya (caused by zeroing the global timer counter) #11
Comments
For what is worth, I don't see anything wrong the code. I have also checked the ARM Cortex-A9 MPCore Technical Reference Manual for the instructions on the global timer (sections 4.4.1 and 4.4.2) and seems like we are doing exactly what they document we should. |
I had a go at reproducing the issue in QEMU, no hang but this is on xilinx upstream 2014.4. gist here. 2014.4 was used as it is the most recent version to match the file structure assumed by the xlinx wiki QEMU guide, by having broken out kernel, devicetree and rootfs images. The copy of the code I was working on had a git checkout of the https://github.com/RedPitaya/RedPitaya at tag:0.92 in it, if that helps the bisect process. I'm pretty sure it didn't crash back then! |
Were you building the system from source back then? The thing is that I can only find images for their OS since 0.94 (see redpitaya downloads which although does have a 0.92 directory it only includes the ecosystem). I have tried to build 0.92 from source but that needs gcc 4 or older. |
I have tried to use web.archive to try and get the RedPitaya old builds. Seems like back then they were using dropbox to distribute the builds which web archive did not archive. See archive from February 2015. The next archival is from March 2016 which is when new builds required an account and they introduced the download servers which only includes the ecosystem for older releases |
I started seeing what timer adjustments we could get away with, and it looks like (at least) the SD card interface is using the global timer:
I think that means we can't mess with it safely. Alternatives:
|
We won't ever need to reset the global timer in our lifetimes. The global timer counter is a 64-bit value (as a pair of adjacent 32-bit registers), incremented every 3ns, so the rollover time is around 1755 years. From RedPitaya's
From
Confirmed on board RP-F0708F: the counter is incremented every 3ns. |
The current dsp code hangs the RedPitaya. The simplest way to reproduce this is to use an empty action table.
I have reproduced this on RedPitaya OS versions 0.94 (oldest we have), 0.95, and 0.97. I have tried Tom's code on the master branch (version after his summer project) and on tom-december-changes (with his work during summer). I have reduced this to the minimal example of setting the global timer counter to zero, with this code:
Tiago has a version of the dsp program on his
redpitaya
branch which works but his version never zeros the register counter. His version reads the initial counter value and computes the difference from it.I have asked Tiago who remembers seeing the same behaviour I do now.
But I guess this must have worked at some point somehow.
@tomparks can you shed some light on this?
The text was updated successfully, but these errors were encountered: