We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

Showing results for 
Search instead for 
Did you mean: 

Adam Taylor’s MicroZed Chronicles, Part 127: EVK Control – In Depth

Xilinx Employee
Xilinx Employee
0 0 40.3K


By Adam Taylor



The Avnet EVK (Embedded Vision Kit) API provided with the example code allows us to communicate with the camera receiver module within the Zynq and with the Python 1300C imaging device on the camera module. This API provides a number of functions.


You use the functions with “_CAM_” in the name to communicate with the camera receiver module. You use the functions with “_SPI_” in their name to communicate with the Python Camera Module:



void onsemi_vita_spi_reg_write( onsemi_vita_t *pContext, Xuint32 uRegOffset, Xuint32 uData )


void onsemi_vita_cam_reg_write( onsemi_vita_t *pContext, Xuint32 uRegOffset, Xuint32 uData )



As developers, we need to be careful to use the correct function for out intended task; they are pretty easy to confuse.


The first function we’ll look at in depth is the function that controls the camera receiver module. The camera receiver module has fewer registers and is not as well documented as the camera module itself, which is well documented via its datasheet.


Examining the VHDL for the camera receiver IP and adding a little code to our example application to read and display the contents of the register helped me to create the following memory map for the camera receiver module. Zynq SoC addressing is 32-bit addressing over the AXI interface so the register addresses increment by four for each address, as you would expect.





Example from the Camera Module Register Display



The complete memory map for the camera receiver can be seen in the pdf document attached at the end of this blog post.


Running the example code, which extracts the contents of all registers, should show alignment between the status that we read last week because they are both generated by the same module. It is also worth noting at this point that the camera receiver is designed to interface to different kinds of sensors, so not all registers may be populated or used.


We need to use the SPI interface to control the Python 1300C module. Through this interface, we can configure and control the settings to make the device exhibit the desired behavior. The SPI interface uses 16 bits of data plus address and command. Using the SPI read command to read the device ID from the Python 1300C sensor module results in the following response–which rather helpfully ties to the datasheet:





There are 279 register within the Python 1300C device on the camera module. These addresses increment by one between addresses and are fully detailed within the datasheet for the device.


It is over the SPI interface that we gain real control of the Python device. We can use this interface to configure the regions of interest/windows, change the digital and analog gain settings, and set all of the other device configurations.


Of course, before jumping in and changing the settings of the Python 1300C device, it is always a good idea to examine the current register contents.


In the next blog we will look a little closer at how we can use some of these advance features now that we understand how to communicate with the Python 1300C imager.





Tags (2)