You are not logged in.
Hi
A quick question regarding the initialization of the packet detection block. Is the following piece of code (taken from the warpmac.c) enough to initialize to the packet detector in isolation?
Thanks,
*((volatile unsigned int *)(XPAR_OFDM_PKTDETECTOR_MIMO_OPBW_0_BASEADDR+ofdm_pktDetector_mimo_csma_enableBusy_OFFSET)) =1; *((volatile unsigned int *)(XPAR_OFDM_PKTDETECTOR_MIMO_OPBW_0_BASEADDR+ofdm_pktDetector_mimo_csma_enableIdle_OFFSET)) =1; *((volatile unsigned int *)(XPAR_OFDM_PKTDETECTOR_MIMO_OPBW_0_BASEADDR+ofdm_pktDetector_mimo_pktDet_masterReset_OFFSET)) = 1; *((volatile unsigned int *)(XPAR_OFDM_PKTDETECTOR_MIMO_OPBW_0_BASEADDR+ofdm_pktDetector_mimo_pktDet_detectionMask_OFFSET)) = 0;/*2*/; /*3= Radios 1 and 2 **needs help** */ *((volatile unsigned int *)(XPAR_OFDM_PKTDETECTOR_MIMO_OPBW_0_BASEADDR+ofdm_pktDetector_mimo_pktDet_detectionMode_OFFSET)) = 1; /*0 = AND, 1 = OR */ *((volatile unsigned int *)(XPAR_OFDM_PKTDETECTOR_MIMO_OPBW_0_BASEADDR+ofdm_pktDetector_mimo_pktDet_resetDuration_OFFSET)) = 32; *((volatile unsigned int *)(XPAR_OFDM_PKTDETECTOR_MIMO_OPBW_0_BASEADDR+ofdm_pktDetector_mimo_pktDet_avgLen_OFFSET)) = 16; *((volatile unsigned int *)(XPAR_OFDM_PKTDETECTOR_MIMO_OPBW_0_BASEADDR+ofdm_pktDetector_mimo_pktDet_avgThresh_OFFSET)) = 7000; /*7000 */ *((volatile unsigned int *)(XPAR_OFDM_PKTDETECTOR_MIMO_OPBW_0_BASEADDR+ofdm_pktDetector_mimo_csma_avgThresh_OFFSET)) = 10000;/*7000 */ *((volatile unsigned int *)(XPAR_OFDM_PKTDETECTOR_MIMO_OPBW_0_BASEADDR+ofdm_pktDetector_mimo_csma_difsPeriod_OFFSET)) = 625; *((volatile unsigned int *)(XPAR_OFDM_PKTDETECTOR_MIMO_OPBW_0_BASEADDR+ofdm_pktDetector_mimo_pktDet_masterReset_OFFSET)) = 0; *((volatile unsigned int *)(XPAR_OFDM_PKTDETECTOR_MIMO_OPBW_0_BASEADDR+ofdm_pktDetector_mimo_pktDet_reset_OFFSET)) = 0;
Offline
Yep, that should be it. The updated warpmac.c changed the format of the calls (using the pktDetector's driver; see below), but the result is the same.
ofdm_pktDetector_mimo_WriteReg_csma_enableBusy(PKTDET_BASEADDR, 1); ofdm_pktDetector_mimo_WriteReg_csma_enableIdle(PKTDET_BASEADDR, 1); ofdm_pktDetector_mimo_WriteReg_pktDet_masterReset(PKTDET_BASEADDR, 1); ofdm_pktDetector_mimo_WriteReg_pktDet_detectionMask(PKTDET_BASEADDR, 1); //1 = radio slot 2 ofdm_pktDetector_mimo_WriteReg_pktDet_detectionMode(PKTDET_BASEADDR, 1); //0 = AND, 1 = OR ofdm_pktDetector_mimo_WriteReg_pktDet_resetDuration(PKTDET_BASEADDR, 32); ofdm_pktDetector_mimo_WriteReg_pktDet_avgLen(PKTDET_BASEADDR, 16); ofdm_pktDetector_mimo_WriteReg_pktDet_avgThresh(PKTDET_BASEADDR, 7000); ofdm_pktDetector_mimo_WriteReg_csma_avgThresh(PKTDET_BASEADDR, 16000); ofdm_pktDetector_mimo_WriteReg_csma_difsPeriod(PKTDET_BASEADDR, 625); ofdm_pktDetector_mimo_WriteReg_pktDet_masterReset(PKTDET_BASEADDR, 0); ofdm_pktDetector_mimo_WriteReg_pktDet_reset(PKTDET_BASEADDR, 0);
Offline