This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DMA Failing on Vision Application using Cortex-A9

Camera Interface DMA goes bonkers and we need a work around or understanding of how this can happen so we can stop it.

We currently are running the IMX6 SL @ 792MHz with X16 DDR3L @396MHz. Core voltage is 1.375V

we are finding that the CSI peripheral gets into a state where the DMA is broken . Its beyond repair at the user register level. we must power cycle to fix it. only a power cycle will recover the HW functionality again.

also verified entire register stack for CSI and CCM with no difference from normal correct operation.

DMA will write 16pixels of a new image at the previous last left write address that is stopped @ from last frame. ( not following te destination address register @ first.)

then after those 16 pixels written in old addresses it will then jump to the correct buffer address and complete with image. the result is a shift and 16 pixel short image.

also there are 16 byte repeat data strips spread at various places in the image. mostly random.

also there are 16byte skips in the image where no writes took place. impossible to make the camera DMA do this even if you wanted to.

none of this can be related to code as there is just a buffer start address and data transfer count so skipping within the buffer is impossible plus we validates the setup on frame start to be correct.

we just do not know what is causing this. it happens somewhere between 150K images and 8.5M images.

we are using an SXGA sensor from aptina with active area of 1280x960 and is running @ 66MHz pixel clock rate.

sensor is good for 74MHz and sensor does not appear to be capable of making the DMA write at incorrect addresses or skip buffer pixels and continuous still creating a coherent image at the same time.

there is another case where no data is written but events operate as though its working correctly. buffer done ISR and all. not writing but reading all the data out is not something we could explain. destination address validated too.

also our SD interface (uSDHC) drops at the same time. assuming the DMA is also going down with the camera DMA simultaneously. we are not doing any SDCARD accesses during the testing but have repeatedly noticed that every time the camera DMA faults the SD goes off hook. this is a very strange and seemingly unrelated peripheral but yet that is what it’s doing.

so this feels much like the CPU DMA system folds on us.

Ethernet continues to operate correctly so it is not all DMA goes off hook.  We are using VxWorks by Wind River.

Help?

  • I'm not entirely clear which DMA controller you are talking about here. The general purpose SDMA in iMX6 is not part of the ARM CPU core, so you may get more speedy advice posing on the NXP developer forums if you want information about the DMA engine itself, or any known issues with it.

    The type of corruption you are seeing could be digital issues, but it smells a little like it could be a power domain under-volt glitching, or thermal related (one can lead to another - hot devices tend to pull more power as the gate resistance increases with temperature, so devices which work fine can start getting under-volt issues when they heat up a bit). You mention it happens after quite a long time (hundreds of thousands of images). From a debugging point of view here a few things which might be worth trying:

    • Is the device getting hot while running - if you run with a heat sink and/or fan active cooling does the issue get any better?
    • If you try dropping the clock rate on (camera, CPU, bus, DMC) does the issue get any better?

    HTH,
    Pete