We have a custom board which uses a custom driver for the CSI modules. CSI1 is connected to an external video decoder (TW9990) in CCIR mode and CSI2 is connected to the internal VADC. On both channels I see memory corruption (writing behind the allocated buffer) when the video signal is disturbed (cable loose, camera loses power). I see this behavior even when only one channel is activated. Does anyone have an idea what can be wrong? I tried zillions of combinations of CSI settings and handling every interrupt source of the CSI module (used the linux driver as a reference). But I can't see that I am doing anything wrong now.
I get a perfect image as long as the camera signal(s) are stable. As soon as the signal get disturbed I get these annoying errors.
Any help is greatly appreciated.
Regards
Matthias
Hi Matthias
seems dma overwrites data beyound buffer limits,
one can try to use some timer, checking frame start/end
and reset dma using DMA_REFLASH_RFF bit in CSICR3.
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
So, you suggest that I setup a timer watching if the DMA is out of range? I don't think that's a clever approach as I can't guarantee a reaction time (Software may be doing other, more high priority things) As there is no such approach in the linux driver and I can't reproduce this behavior with the linux driver I suspect that there is some setup problem on my side. I have done intensive research with the linux and u-boot driver of the CSI but can't spot any major difference. Maybe there is something outside the CSI module which influences this behavior.
I already reset the DMA when an adress change error occurs (as suggested in the datasheet) but that doesn't change the behavior.
Do you have any other idea?
Regards
Matthias