CoaXPress discovery and configuration as the supplied driver performs it, in register terms. Camera addresses are the CoaXPress bootstrap registers.
- Identify the coreRead
ID(expect 0xA71C0A01) andVERSION(0x02020001 for v2.2.1). ReadHWCFGandVIDEO_CAPfor the transceiver, connections and the formats built. - InterruptsClear
ISR, enable the sources you service inIER(LOCKED, LOSS_LOCK, CNTRL_ACK, RATE_DONE, RATE_ERR, FRAME, the error sources), setGLBL_IER. - DiscoveryUplink at 20.83 Mb/s, untagged commands (
CXP_LS_MODE= 0). Send ConnectionReset to the camera, then stepCXP_RATE_TRANSthrough the discovery speeds until the connection locks. - Probe the cameraRead the bootstrap Standard register (0xC0A79AE5 for a CoaXPress camera), write a Host ID to MasterHostConnectionID and to
CXP_MASTER_ID, read ConnectionConfigDefault for the operating speed, and negotiate the version and packet size. For CXP 2.x setCXP_LS_MODE.TAGGED. - Operating speedWrite ConnectionConfig on the camera and wait for its acknowledge, then write
CXP_RATE_TRANSwith the new speed andAPPLY, andCXP_LS_MODE.LS_RATEfor CXP-10 and CXP-12. Wait for RATE_DONE and LOCKED. - Stream setupWrite
STREAM_PCKT_MAXwith the negotiated packet size andPIXEL_TYPEwith the camera’s pixel format; checkPIXEL_TYPE.NOT_BUILT= 0. - AcquireStart acquisition through the camera’s GenICam registers. FRAME fires on every image header,
FRAMES_RECVcounts frames and the image header registers show the geometry. - MonitorWatch
CXP_ERRORS_HS,VIDEO_OVF_ERRS,PIX_LINE_ERRSandSTREAM_TAG_ERRS. A rising CRC count points at the cable, the connector or the equalizer.
The same steps with plain register accesses, for the first look at a new board:
/* base = address of cxp_host_0 in the Vivado address editor */
#define HOST(off) (base + (off))
if (Xil_In32(HOST(0x000)) != 0xA71C0A01) return -1; /* ID */
u32 ver = Xil_In32(HOST(0x004)); /* VERSION 2.2.1 */
u32 cap = Xil_In32(HOST(0x030)); /* VIDEO_CAP */
Xil_Out32(HOST(0x018), 0xFFFFFFFF); /* ISR: clear everything */
Xil_Out32(HOST(0x01C), 0x2A84); /* IER: CNTRL_ACK, LOCKED, FRAME, */
/* RATE_DONE, RATE_ERR */
Xil_Out32(HOST(0x014), 1); /* GLBL_IER */
/* ... discovery and camera configuration through the control channel ... */
Xil_Out32(HOST(0x028), 0x0A); /* PIXEL_TYPE: Bayer 12-bit */
if (Xil_In32(HOST(0x028)) & (1u << 17)) return -2; /* not built */
u32 frames = Xil_In32(HOST(0x160)); /* FRAMES_RECV */
The software driver supplied with the core performs these steps, including the control channel transactions and the line rate change; see Software.