The camera is another I2C peripheral, but to display video we need to read the array pixels that make up an image and write their values to the GLCD very rapidly. We achieve this by using Direct Memory Access (DMA) to stream image frames directly to the GLCD rather than writing individual values as we did for the audio codec demo. We'll name this recipe cameraDemo_c6v0
.
Create a new project named
cameraDemo
. Using the RTE manager, go to Board Support and select the Camera (API) and Graphic LCD (API) software components.Set the CMSIS and Device software components, as we've done for previous projects. Set the Use MicroLIB project option.
Create a file named
cameraDemo.c
and add boilerplate code to configure clocks, and so on. Add this file to the project.Add a
main()
function to thecameraDemo.c
file:Build, download, and run the program, as follows:
int main (void) { uint32_t addr; HAL_Init(); /* Initialize the HAL Library */ SystemClock_Config...