-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
HQ camera link frequency can cause GPS distruption #6004
Comments
Hi, any update on this? I see that it hasn't been taken on yet. Any tips on how to resolve it as I have a whole load of these cameras inside units with GPS and when then camera is on you can kiss goodbye to GPS signal! |
I had 30mins spare, so have done the quick patch to add it (based on imx708). Give it 40mins for CI to run, and you should be able to get the test kernel using Same as imx708, you can load |
This is great, I will give it a try with a new kernel. Question... I also have a legacy version that I need to support, with kernel 5.4.154. I build from a snapshot so I can apply code changes. Is it sufficient to just edit the line: #define IMX477_DEFAULT_LINK_FREQ 450000000 Or could that cause problems and I need to apply the other changes to make it configurable etc? |
Ok that didn't work on the old kernel. Do I need to change some registers as well? |
Just changing If you want to do the quick hack, then changing register 0x030f from 0x96 to 0x97 or 0x98 in the table of registers would make the change without telling the rest of the system about it (it's not a critical thing for anything else to know about). Do note that it occurs multiple times. |
I've tried it out and with a 200mm unshielded camera cable there is still some interference at 453, 456 and I even tried 459. It's better but still causing some signal loss. How high can we take the link frequency, do you know? Could it go up even higher without causing issues/damage? |
Also is there some way of double checking that the link frequency change has worked? Something I can call to return the current link frequency? |
You could go up to 500MHz and still be compliant with the CSI2 spec v1.0 as implemented on Pi0-4. The module has been EMC tested with the values in the driver as they were at 450MHz, so any significant changes technically should result in redoing EMC testing.
(oops, I appear to have an extra entry in there - one to fix!) Alternatively you can use |
#6483 to fix the link frequency menu having the rogue entry in it. |
I get:
and...
and...
|
Grr, typo. |
I only have a
Thanks for helping with this! Update: sorry ignore the above, the camera wasn't running. However, even though I edited the registers in the kernel source code it is still reading as 0x96
If I change the register with i2ctransfer will it change the link frequency on-the-fly? I tried this...
Then I got:
Then I stopped the camera and started it again and got:
|
Yes you can change the registers on the fly. |
I can confirm it's working in the latest Bookworm, but I've not been able to get it work with the old kernel. Any advice appreciated |
Update: On bullseye I was able to pull the new kernel and apply the new link_frequency and it works fine in libcamera - can see 0x97 at 0x030f with i2ctransfer Does the legacy stack override the registers in the kernel driver?? |
The legacy camera stack is baked into the firmware and doesn't touch the kernel drivers at all. And it's deprecated (replaced by libcamera), so there won't be any changes there. |
Hi I am facing severe GPS interference from the HQ camera module for a UAV. How can we be 100% sure that the frequencies are being chaged? Has anyone actually been able to fix the interference just by adjusting the frequency in the dtoverlay? |
The PR was merged back in November, so is in the latest standard builds. You therefore don't need to use rpi-update or anything else to get a testing kernel. Shifting the link frequency was sufficient on imx708 for those that had reported issues. As per the comment at #6004 (comment), we could increase the link frequency up to 500MHz, but technically that means putting the module through EMC testing again. |
raspberrypi#6004 reports further issues with GPS interference. Untested, but adds further link frequency options. Signed-off-by: Dave Stevenson <[email protected]>
#6617 adds extra link frequency options of 459, 462, and 498MHz. I haven't tested them. If you have issues of GPS interference and wish to pursue it, then please test. |
Hi, I tried to do
Also can you explain what you mean by "CI builds should be complete in about 40mins, and available for the next 90 days"? |
I mean that CI builds complete in about 40 mins, and the artifacts are retained for 90 days. |
"CI" stands for Continuous Integration, which is a fancy way of saying we run a build on every change (and suggested change). The "artifacts" are the kernel image, modules and Device Tree files, which are what you can install using |
Thanks for the clarification guys. The kernel build was installed fine but it won't generate the initramfs and so overlayroot will no longer work. If I revert back to 2024-11-19 stable image then the Any ideas? |
Just to reiterate - the link frequency changes do not work with the current OS release and pulling kernel from 6617 results in reduced functionality (such as, in my case, overlayroot not working). |
Changes generally aren't merged until they're confirmed to work. The basic options for link-frequency (453 and 456MHz) were merged in November 2024, so will be in the standard kernel of 6.6.64 or above (current in Raspberry Pi OS Bookworm is 6.6.74) You've said
So which value for |
According to the release notes, and my experience of the latest standard release it's v6.6.51...
Even #6617 from Jan 20th only pulls v6.6.72 Regarding the interference, there is a noticeable improvement for me on any frequency other than the default one! Though, I've not personally tried 498MHz but will be interested to do so. |
https://archive.raspberrypi.com/debian/pool/main/l/linux/ would beg to differ. You've had a 6.6.62 and 6.6.74 release since 6.6.51. I assume you've done a normal @david-delmoral had said that 453MHz was insufficient for his use case, hence PR #6617. However he hasn't come back to say whether it helps or not. That won't get merged unless there is a reported improvement in using it. |
This is just the standard download image I'm referring to, from Nov 19th, that has kernel version 6.6.51. i.e. if your device doesn't have internet connectivity for upgrading. If I can solve the overlayroot issue with pulling #6617 then I can test the 498MHz link-frequency, Any ideas on how to fix that? |
Full images are created a couple of times a year as they get a fair amount of testing done on them. Seeing as you obviously have an internet connection if you're using rpi-update, and you've said that anything other than the default rate solves your problem so just using |
Ok I might just go ahead and test 498MHz without overlayroot and just do manual shutdowns, that way I can report back so that if it is even better than 453/456 then it can be merged into the next release |
After testing the additional link-frequencies I can confirm that 459MHz and 498MHz are the best followed by 453MHz and 456MHz. I guess mileage could vary based on which GPS receiver, camera cable and even the enclosure you are using, so having as many options as possible seems ideal to me! |
I tried 462MHz again and it works fine, not sure what the problem was the first time...must have been something else. Camera itself works with no problems, on all frequencies |
#6004 reports further issues with GPS interference. Untested, but adds further link frequency options. Signed-off-by: Dave Stevenson <[email protected]>
#6617 is now merged. |
This is great, thanks guys. Any idea when there will be a new kernel in the update stream? Looks like there hasn't been one since January. |
The plan is to shift to 6.12 for the next kernel release, but there are a couple of changes still desired to be made before that. |
#6004 reports further issues with GPS interference. Untested, but adds further link frequency options. Signed-off-by: Dave Stevenson <[email protected]>
#6004 reports further issues with GPS interference. Untested, but adds further link frequency options. Signed-off-by: Dave Stevenson <[email protected]>
#6004 reports further issues with GPS interference. Untested, but adds further link frequency options. Signed-off-by: Dave Stevenson <[email protected]>
#6004 reports further issues with GPS interference. Untested, but adds further link frequency options. Signed-off-by: Dave Stevenson <[email protected]>
#6004 reports further issues with GPS interference. Untested, but adds further link frequency options. Signed-off-by: Dave Stevenson <[email protected]>
#6004 reports further issues with GPS interference. Untested, but adds further link frequency options. Signed-off-by: Dave Stevenson <[email protected]>
#6004 reports further issues with GPS interference. Untested, but adds further link frequency options. Signed-off-by: Dave Stevenson <[email protected]>
Describe the bug
From raspberrypi/libcamera#43, the same issue of GPS interference has been noted on the HQ camera as well as the v3 that has already been fixed.
Look at tweaking the PLL settings to move the peak away from GPS on 1575MHz.
Steps to reproduce the behaviour
See raspberrypi/libcamera#43
Device (s)
Raspberry Pi 4 Mod. B
System
All kernels as the link frequency has never varied.
Logs
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: