The most examples for working with PicoZed SDR SOM Z7035/AD9361 Development Kit use the Linux or Matlab across Linux. But I want a baremetal solution.
My task is:
1. Send number from Host PC to Picozed using UART;
2. On Picozed send this number to DAC for transmit;
3. Then receive and read ADC and get the same number;
4. Send number to Host PC
HDL design I took here: https://github.com/analogdevicesinc/hdl/tree/master/projects/pzsdr/ccfmc
AD9361 API took here: https://github.com/analogdevicesinc/no-OS/tree/master/ad9361
Here I launched 'create_xilinx_sdk_project.bat' and got Xilinx SDK project.
And what is next? In 'dac_core.c' file I found 'void dac_write(struct ad9361_rf_phy *phy, uint32_t regAddr, uint32_t data)' method. It's how this method do writing data to DAC:
Xil_Out32(AD9361_TX_0_BASEADDR + regAddr, data);
What regAddr I need to transmit my data? Obviously I have to see DAC Register Map. That's what I found: https://wiki.analog.com/resources/fpga/docs/hdl/regmap
Many-many registers but where the one what I need?
Another example.
In SDK example:
/* LO Control */
2400000000UL, //rx_synthesizer_frequency_hz *** adi,rx-synthesizer-frequency-hz
2400000000UL, //tx_synthesizer_frequency_hz *** adi,tx-synthesizer-frequency-hz
But when I do next:
uint64_t data = 0;
ad9361_get_rx_lo_freq(ad9361_phy, &data);
printf("%u \n", data);
I'm getting (Hz):
1311496
WHY? What is going on?
May somebody can help me please? I need something like simple example code for PicoZed SDR SOM Z7035/AD9361 that's working fine.
If I took wrong HDL design or something like this, get me please relevance links to right materials for PicoZed SDR SOM Z7035/AD9361