News:

Attention: For security reasons,please choose a user name *different* from your login name.
Also make sure to choose a secure password and change it regularly.

Main Menu

XADC with Zynqberry TE0726

Started by pb, June 20, 2017, 09:08:58 AM

Previous topic - Next topic

pb

Hi everyone,

I would like to use the XADC on my Zynqberry TE0726_02M to capture external signals. I successfully tested the demo projetcs from the Xilinx SDK and I can read all internal voltages (temperature, vcc, etc).

TRM states that the XADC pins are on Bank 35. Can I use AD0, AD1, AD8, AD9 for measuring analog signals? Those pins are all mapped to DSI on the Zynqberry. Is it possible to map them to pins on the GPIO header?
Same question for V_P and V_N. They are tied to the RCA connector. Can I use V_N to measure an analog signal? (V_P is tied to 1.0 volt supply).

Thanks in advance

Oleksandr Kiyenko

Hello,

You can't map this signals to other pins. Yes you can measure/capture signal from audio connector, it's already implemented in reference project to record audio.

Best regards
Oleksandr Kiyenko

pb

Hi Oleksandr,

thanks for your reply.

What about AD0, AD1, AD8, AD9? They are connected to DSI. Can I still use them with XADC and apply the signals I want to capture to the DSI connector?
(Am I right, that the other ADx are not available in the CL225 package?)

Thanks

Oleksandr Kiyenko

Hello,

Yes you can use this 4 signals from DSI connector for XADC analog inputs.

Best regards
Oleksandr Kiyenko

pb

Hi Oleksandr,

I tried to capture an analog signal with the audio connector in a bare metal application. Unfortunately I only get constant vaules (they change after power cycle).
Altough measuring the on chip temperature works fine.

I configured the XADC as follows:

   // Initialize the XAdc driver.
   ConfigPtr = XAdcPs_LookupConfig(XADC_DEVICE_ID);
   if (ConfigPtr == NULL) {
      return XST_FAILURE;
   }
   status   = XAdcPs_CfgInitialize(XAdcInstPtr, ConfigPtr, ConfigPtr->BaseAddress);
   if (XST_SUCCESS != status) {
      return XST_FAILURE;
   }

   // Self Test the XADC/ADC device
   status   = XAdcPs_SelfTest(XAdcInstPtr);
   if (XST_SUCCESS != status) {
      return XST_FAILURE;
   }

   // Disable the Channel Sequencer before configuring the Sequence registers.
   XAdcPs_SetSequencerMode(XAdcInstPtr, XADCPS_SEQ_MODE_SINGCHAN);

   // Disable Alarms
   XAdcPs_SetAlarmEnables(XAdcInstPtr, 0x0000);

   // Enable Channels
   XAdcPs_SetSeqChEnables(XAdcInstPtr, XADCPS_SEQ_CH_TEMP | XADCPS_SEQ_CH_VPVN);

   XAdcPs_SetSequencerMode(XAdcInstPtr, XADCPS_SEQ_MODE_CONTINPASS);


In my code I use

XAdcPs_RawToTemperature( XAdcPs_GetAdcData(&XAdc, XADCPS_CH_TEMP) );

(XAdcPs_GetAdcData(&XAdc, XADCPS_CH_VPVN) );

As mentioned reading the chip temperature works fine, but not the vp/vn channel. With the same approch I cancapture analog signals on a different Zynq board via the VAUX pins (and changing XADCPS_SEQ_CH_AUX and XADCPS_CD_AUX).

Can you give me a hint?
Thanks