-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Irregular GPIO Latency with DMA #516
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
Comments
Is this Pi 1? What does |
Sorry , I use effectively disable_l2cache=0 else I have timing issue The firmware I guess I use is get from the fix #497 |
disable_l2cache=0 is default for Pi1 Are you able to detect the problem with start_x=1 (without using a scope?) |
OK for info about l2cache... |
I can't see an obvious reason why the start_x firmware will have worse gpio latency. If that is not straightforward to do, I can make a number of test firmwares that you can test to narrow down the problem - but that will be a slower procedure. |
After inspecting further, start_x is not directly the cause, but access to camera. Running raspivid makes the GPIO latency (or interfere with DMA) thus the drift is around 2us instead of 100 ns. |
That is not surprising. Running raspivid will generate a lot of AXI traffic (mostly sdram) and that will increase latency of other users. We may be able to expose a method of changing priority of different AXI clients, but that only has limited effect. If an access ahead of you is in progress yours will have to wait (but the priority may ensure the next access is yours rather than another). |
Obviously minimising the work done by raspivid will reduce the latency. e.g. lower resolutions/framerates/bitrates will generate less competing AXI traffic. |
You can include AXI priority in DMA_CS register. Setting to 15 may help a little. |
This is already done ... 2016-01-09 15:48 GMT+01:00 popcornmix [email protected]:
|
There is probably not more that can be done. When the roads are busy your journey takes longer. |
When your task has to share resources there's gonna be some drift. |
Closing as I'm not sure there is anything we can fix. |
rpitx (http://hackaday.com/2015/11/04/rpitx-turns-rasberry-pi-into-versatile-radio-transmitter/) is using DMA and access to GPIO and clock registers.
My config.txt
disable_l2cache=1
disable_pvt=1
force_turbo=1
arm_freq=700
gpu_freq=250
core_freq=250
sdram_freq=400
kernel=kernel.img
If start_x =1 : drift is about 2 to 3 us to acess to GPIO (camera is not used in parallel to the software)
if start_x=0 : drift is around 0.1 to 0.2 us
Any idea what is the reason ?
I could send a sourcecode to test.
Here is snapshots :
With start_x=1
With start_x=0
The text was updated successfully, but these errors were encountered: