AnsweredAssumed Answered

Request data transfer on falling edge of GPIO using eDMA in MK24FN256V

Question asked by Narendra Suthar on Apr 15, 2016



I want to interface OV2642 camera module with Kinetis MK24FN256V device.

I have connected camera data lines D0 - D7 with GPIO PORTC0 - C7, and other camera signals to other GPIO pins.

I have configured the eDMA for single byte data transfer on every falling edge of PCLK which is connected to PORTA pin # 12. I have configured interrupt for this pin for DMA request on falling edge (PORTA_PCR12 |= PORT_PCR_IRQC(0x02)).

The camera PCLK frequency is 1.6 MHz. Every DMA request I am transfering 1 Byte from peripheral to memory.

I am starting eDMA channel on rising edge of HREF and stop on falling edge of HREF. I am doing this for one frame.

I have configured the camera for JPEG image output. I am getting the JPEG image header and footer, but getting the image currupted or not clear. I think this is due to missing data during DMA transfer.

I need your help to capture image without missing data. Will you help me to cofigure the eDMA such that it will not miss the data? or suggest me example for eDMA transfer for Peripheral to memory on DMA request by GPIO pin.


I have attached my firmware bellow. This is in keil MDK5, Using SDK 1.3 and TWR-K24F120M development board.





Original Attachment has been moved to: