AN2676 Freescale Semiconductor / Motorola, AN2676 Datasheet - Page 12

no-image

AN2676

Manufacturer Part Number
AN2676
Description
Image Capture with i.MX21
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Software Design
Table 6 shows VGA output in RGB565 format.
//module init
* (uint32_t *)GPIOB_GIUS &= ~0x3FFC00;//disable GPIO PB[21..10]
* (uint32_t *)CRM_PCCR0 |= 0x80000000;//HCLK clock enable
*(uint32_t *) CSI_CSICR1 = 0x0;//register clear
*(uint32_t *) CSI_CSICR1 |= 0x0200;//MCLK = HCLK / 2
//timing control
*(uint32_t *) CSI_CSICR1 |= 0x20000;//SOF rising edge
*(uint32_t *) CSI_CSICR1 |= 0x10000;//SOF INT enable
*(uint32_t *) CSI_CSICR1 |= 0x2;//latch on rising edge
*(uint32_t *) CSI_CSICR1 |= 0x10;//gated clock mode
*(uint32_t *) CSI_CSICR1 |= 0x800;//hsync active high
//FIFO control
*(uint32_t *) CSI_CSICR1 |= 0x100;//sync FIFO clear
*(uint32_t *) CSI_CSICR1 |= 0x100000;//RXFF level = 16
//data manipulation
*(uint32_t *) CSI_CSICR1 |= 0x80000000;//swap16 enable
*(uint32_t *) CSI_CSICR1 |= 0x80;//big endian
//PRP i/f control
*(uint32_t *) CSI_CSICR1 |= 0x10000000;//PRP i/f enable
12
CSI Output / PRP Input
PRP Ch1 Output
PRP Ch2 Output
Data Format
CSI Input
RGB565
YUV422
Signal
Freescale Semiconductor, Inc.
For More Information On This Product,
Table 5. Data Formats Accepted by PRP
Table 6. VGA Output in RGB565 Format
MC9328MX21 Application Note
Code Example 1. CSI Init
Go to: www.freescale.com
QVGA (Stride to 240x240)
Traditional Timing VGA
Resolution
Endian
QVGA
Little
VGA
Big
Color Space
RGB565
RGB565
RGB565
Swap16
YUV420
Disable
Enable
MOTOROLA

Related parts for AN2676