Hello, I have recently begun using the Zedboard with the HDL Coder Toolbox and it have worked quite well so far. However, I have now been trying to resolve an error for quite a while that is related to running a .bit-file using the XADC-interface from the Zedboard's SD-card.
What happens is that if I use Xilinx' XADC-interface in my reference design, it will produce wrong measurements after around 5 seconds of running. Important to note is that this only happens if I use the "Download" option in step 4.4 in the HDL Workflow Advisor. If I program the Zedboard through either the JTAG-option or through Vivado's hardware manager, the error does not occur. This leads me to believe that it is not the Simulink model or reference design that is the issue but either Mathworks' Linux distro or the way the .bit file is loaded onto the SD-card. Also, using the Zedboard's general purpose LEDs directly connected to the XADC-interface, it can be seen that the measurements there are also incorrect, pointing towards the error not being in the communication between PC and Zedboard. Also, every other function works fine; I have tried to run a sine-wave generator on the PL of the board in addition to the XADC and the sine is generated just fine while the XADC provides weird measurements so it is not the entire PL-part of the board producing wrong data but just the XADC.
I have attached a picture of a 10 second scope log (sampled at 100 Hz with 0 voltage input) to this post.
I am using Vivado 2016.4 and MATLAB 2017b as well as the Embedded Coder Linux image on the Zedboard.
So I guess my question is essentially, why does the XADC produce wrong measurements when being loaded from a .bit-file on the Zedboard?
Please let me know if you need any additional information/logs. And thanks for your time
Ps. I do not know whether this is a problem related to the HDL Coder or Vivado (which would make it a Xilinx issue) but due to the error only happening when I use the download option, I guess it has something to do with the way HDL Coder downloads the .bit file to the board.