What the firmware does from power-up to streaming, in register terms. The frame grabber drives discovery; the camera answers.
- Identify the coreRead
ID(expect 0xA71C0A02) andVERSION(0x02020000 for v2.2.0). ReadHWCFGandVIDEO_CAP. - InterruptsClear
ISR, enable LS_CNTRL_VLD, LS_RX_ALIGNED, the loss of lock sources, STREAM_ON, STREAM_OFF, TX_READY and RATE_ERR inIER, setGLBL_IER. - Wait for a HostLS_RX_ALIGNED fires when a frame grabber is on the line. Commands arrive with LS_CNTRL_VLD.
- Serve the control channelFor every command, read it from the received command registers, act on the camera’s register space, and answer through the acknowledge builder. On a write to MasterHostConnectionID, write the ID to
CXP_TX_MSTR_ID; on CXP 2.x setCXP_LS_MODEbit 0. - Change speedOn ConnectionConfig, acknowledge first, then write
CXP_RATE_TRANSwith the new speed andAPPLY, andSTREAM_LANES. TX_READY reports the transmitter back at the new speed. - Start the streamOn AcquisitionStart, write the image header registers,
PIXEL_TYPEandCXP_STREAM_PCKT_MAX, thenSTREAM_STATUSbit 0. STREAM_ON confirms it. - Stop the streamOn AcquisitionStop, write
STREAM_STATUSbit 1. STREAM_OFF fires when the frame in flight has gone out.
The first accesses with plain register reads and writes:
/* base = address of cxp_dev_0 in the Vivado address editor */
#define DEV(off) (base + (off))
if (Xil_In32(DEV(0x000)) != 0xA71C0A02) return -1; /* ID */
u32 ver = Xil_In32(DEV(0x004)); /* VERSION 2.2.0 */
Xil_Out32(DEV(0x018), 0xFFFFFFFF); /* ISR: clear everything */
Xil_Out32(DEV(0x01C), 0x78E4); /* IER: CNTRL_VLD, lock, STREAM_ON, */
/* STREAM_OFF, TX_READY, RATE_ERR */
Xil_Out32(DEV(0x014), 1); /* GLBL_IER */
/* AcquisitionStart: header, format, packet size, then stream on */
Xil_Out32(DEV(0x0B8), 3840); /* CXP_IMG_XSIZE */
Xil_Out32(DEV(0x0C0), 2160); /* CXP_IMG_YSIZE */
Xil_Out32(DEV(0x028), 0x08); /* PIXEL_TYPE: Bayer 8-bit */
Xil_Out32(DEV(0x0D8), 1); /* STREAM_STATUS: stream on */
The firmware driver supplied with the core performs these steps and the command loop; see Software.