Fixing "base address switching error".

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Fixing "base address switching error".

966 Views
dennis3
Contributor V

There are a number of threads where the base address switching error problem has come up for the mx8mq.  

Here is the one with the most similar problem to my own: https://community.nxp.com/thread/502102 

In each of the threads I've found, the end solution has never been posted.  Only suggestions that one might contract with nxp custom porting solutions.  It seems this is a common enough occurring problem that perhaps someone who has had the problem can suggest what the solution was?

For our product, we have the same problem as mentioned in the other thread.  When streaming works, it works every time we start the camera.  Between camera sessions, we reset and power off our camera sensor then power it back on when it is needed.  The camera streams successfully every time.  When it doesn't work however, we get the 'base address switching error' and it will never work unless we reboot the device again.

It seems the device is in some state during some boot up sequences that is not correct and other times it is correct for streaming.  I've compared all csi2 and mipi-csi2 registers however and see no difference.  There are no errors reported for any of the mipi status registers.  The meaning of the error is that an address switch occurred before the DMA transfer was completed.  Does this suggest one of the clocks isn't fast enough?  If so, why does it work reliably on some boot cycles and not at all on other cycles?

Any insight into what one might reset between camera runs to ensure a correct state without having to reboot would be much appreciated.

Thanks!

Labels (1)
Tags (3)
0 Kudos
3 Replies

893 Views
art
NXP Employee
NXP Employee

The issue you describe is reported as the known one in the Linux 4.14.98 Release Notes document. It is marked as "to be fixed in the next BSP release". So, please migrate to the latest L5.4.24 BSP and try it.

Best Regards,
Artur

0 Kudos

840 Views
dennis3
Contributor V

Hi @art 

I had opportunity to try the Android 10.0.0_2.3.0 release which is supposedly build on the 5.4.24 BSP.  I'm afraid the situation was unchanged for us.  Did I miss something in the versions?  I don't actually see any changes related to CSI mipi in the kernel drivers.  

We have one sensor that works partially as I'd previously mentioned with the clock adjustments.  We have another sensor that we are unable to stream at all except at lower resolutions.  Anything over 1440 rows always results in Base address switching err.  We can increase the columns and successfully transfer images but increasing number of rows always breaks.

Still wishing there was additional guidance on how to fix this error.  Thanks for any input!

0 Kudos

892 Views
dennis3
Contributor V

Thank you @art for the info.  I'll look for changes in an update.

I'd like to add that we are working around this problem now by lowering the recommended clock speed. 

In many posts on these forums the recommended is (4 lane mipi 8M@30fps camera)

assigned-clock-rates = <266000000>, <333000000>, <66000000>;

That works but we found that the following does not exhibit the switching error.

assigned-clock-rates = <266000000>, <250000000>, <66000000>;

In either case, we notice that not all frames delivered from the camera via mipi are delivered to Android (quite a few dropped frames).  But moving to the slower clock speed doesn't seem to have made any additional frames dropped than were dropped before.  

0 Kudos