All Activity

This stream auto-updates     

  1. Past hour
  2. fandrei

    Zybot + USB WIFI Adapter (RALink 5370)

    I wonder if you can share the instruction how to do that?
  3. Today
  4. Piotr Rzeszut

    Acquiring data until an event occurs

    I think triggering in normal mode on that data with correct trigger position i.e. long enough pre-trigger time/correct position. See Mode: record
  5. Hi. I have a Digital Discovery debugging an old microprocessor, so I have 16 address lines in a bus and 8 data line in a bus. What I would like to know is what the microprocessor is doing when it decides to access a particular address. So I'd like to like to click Run, start acquiring data, and then have it stop when the bad address is accessed, so that I have the data leading up to that event. It's sort of like a trigger that stops acquisition instead of starting acquisition. Is there a way to do this? Thank you, Bob
  6. Piotr Rzeszut

    Python digital continuous record (AD2/DD)

    Well, I figured out somehow following code: """ DWF Python Example Author: Digilent, Inc. Revision: 11/24/2014 Requires: Python 2.7, numpy, """ from ctypes import * from dwfconstants import * import math import sys import time import matplotlib as mpl import matplotlib.pyplot as plt if sys.platform.startswith("win"): dwf = cdll.dwf elif sys.platform.startswith("darwin"): dwf = cdll.LoadLibrary("/Library/Frameworks/dwf.framework/dwf") else: dwf = cdll.LoadLibrary("") # declare ctype variables hdwf = c_int() sts = c_byte() cdevices = c_int() devicename = create_string_buffer(64) # print DWF version version = create_string_buffer(16) dwf.FDwfGetVersion(version) print "DWF Version: " + version.value #enumerate and print device information #4 for AD2 dwf.FDwfEnum(c_int(0), byref(cdevices)) print "Number of Devices: "+str(cdevices.value) # open device print "Opening device:" for i in range(0, cdevices.value): dwf.FDwfEnumDeviceName (c_int(i), devicename) if devicename.value == "Digital Discovery": dwf.FDwfDeviceOpen(c_int(i), byref(hdwf)) print "\t", i, " : ", devicename.value if hdwf.value == hdwfNone.value: print "failed to open device" quit() print "Configuring Digital Out / In..." dwf.FDwfAnalogIOChannelNodeSet(hdwf, c_int(0), c_int(1), c_double(3.3)) time.sleep(0.1) dwf.FDwfDigitalInReset(hdwf) #dwf.FDwfDigitalOutReset(hdwf) dwf.FDwfDigitalInInputOrderSet(hdwf, c_bool(False)) # generate counter #for i in range(0, 8): # dwf.FDwfDigitalOutEnableSet(hdwf, c_int(i), c_int(1)) # dwf.FDwfDigitalOutDividerSet(hdwf, c_int(i), c_int(1 << i)) # dwf.FDwfDigitalOutCounterSet(hdwf, c_int(i), c_int(1000), c_int(1000)) #dwf.FDwfDigitalOutConfigure(hdwf, c_int(1)) # set number of sample to acquire nSamples = 200000 rgwSamples = (c_uint8 * nSamples)() cAvailable = c_int() cLost = c_int() cCorrupted = c_int() iSample = 0 fLost = 0 fCorrupted = 0 # in record mode samples after trigger are acquired only dwf.FDwfDigitalInAcquisitionModeSet(hdwf, acqmodeRecord) # sample rate = system frequency / divider, 100MHz/100 = 1MHz dwf.FDwfDigitalInDividerSet(hdwf, c_int(100)) # 16bit per sample format dwf.FDwfDigitalInSampleFormatSet(hdwf, c_int(8)) # number of samples after trigger dwf.FDwfDigitalInTriggerPositionSet(hdwf, c_int(0)) # 50% # number of samples before trigger dwf.FDwfDigitalInTriggerPrefillSet(hdwf, c_int(1)) # enable data compression by select used lines dwf.FDwfDigitalInSampleSensibleSet(hdwf, c_int(0x00FF)) # trigger when all digital pins are low dwf.FDwfDigitalInTriggerSourceSet(hdwf, trigsrcNone) # trigger detector mask: low & hight & ( rising | falling ) # dwf.FDwfDigitalInTriggerSet(hdwf, c_uint(0xFFFF), c_uint(0), c_uint(0), c_uint(0)) # begin acquisition dwf.FDwfDigitalInConfigure(hdwf, c_bool(1), c_bool(1)) print "Starting record" mpl.rcParams['toolbar'] = 'None' ax1 = plt.gca() while True: dwf.FDwfDigitalInStatus(hdwf, c_int(1), byref(sts)) dwf.FDwfDigitalInStatusRecord(hdwf, byref(cAvailable), byref(cLost), byref(cCorrupted)) iSample += cLost.value iSample %= nSamples if cLost.value: fLost = 1 if cCorrupted.value: fCorrupted = 1 iBuffer = 0 while cAvailable.value > 0: cSamples = cAvailable.value # we are using circular sample buffer, make sure to not overflow if iSample + cAvailable.value > nSamples: cSamples = nSamples - iSample dwf.FDwfDigitalInStatusData2(hdwf, byref(rgwSamples, iSample), c_int(iBuffer), c_int(cSamples)) iBuffer += cSamples cAvailable.value -= cSamples iSample += cSamples iSample %= nSamples #print sts.value, " ", iSample if sts.value == DwfStateDone.value: break if not plt.get_fignums(): print "CLOSED" break ax1.clear() ax1.plot(rgwSamples) plt.pause(0.0001) dwf.FDwfDeviceClose(hdwf) print "Recording finished" if fLost: print "Samples were lost! Reduce sample rate" if cCorrupted: print "Samples could be corrupted! Reduce sample rate" f = open("record.csv", "w") for i in range(0, nSamples): iAlign = (i + iSample) % nSamples # first sample in our buffer is at iSample index f.write("%s\n" % rgwSamples[iAlign]) f.close() But quite often I get reading with nasty glitches: The signal is generated using Analog Discovery 2. For a connection I am using High-speed inputs 0..7 of DD and DIO 0..7 for AD2. Configuration of AD2:
  7. First of all, I'm not sure if this is the right forum for this, as this is a question about tool installation and usage. If it is in the wrong place perhaps a mod can move this or provide a suggestion as to the right place to ask this. I had SDoC 2018.1 installed along with Vivado and Vivado HLS and subsequently installed 2016.4 Vivado, SDK, and Vivado HLS to work with the OOB project for my Digilent board. I got that working and was able to go through much of the project all the way to debug and program and verify with the SDK and the contained C code. A few days later I wanted to start utilizing some of the example projects and the xfopencv libs, but was unable to download them. I saw that SDoC 2081.2 was released, so I downloaded and installed that and upon starting SDoC I started having the problem. It appears that when changing focus between the different container objects in the gui that the ui becomes unresponsive for about 20 seconds with the spinning blue circle. Then it will get focus and I can nav around in the container, but after I close it and try to select a menu item or a tab in another container, the ui can't get focus for another 20 seconds. This is really frustrating as it makes even setting up the environment futile. I then fully uninstalled SDoC 2018.2 and re-installed it with a fresh download but got the same issue. Keep in mind that 2018.1 worked just fine. I then did a full uninstall of 2018.1 and 2018.2, then another fresh download and install of 2018.2 with no 2018.1 on the computer. I still observe the same behavior. I should mention that Vivado 2018.2 and the SDK being launched from the Vivado menu seems to work just fine. After a few days of looking around for an answer to this, I've come up short so I'm asking for advice and or help here. I applied for a ticket at the Xilinx Service Portal, but it may take a few days to get through the noise there with no guarantee I will get help due to my non-corporate email address, although I do have an SDoC license. I'm also thinking that if it's a problem with the SDoC ui interacting poorly with eclipse that may be another issue. I have inspected my environment variables, license location, and viability and SDoC does report the license is available in the console when I start it...although sometimes it takes a while to establish that. My internet connection is solid and fast with 100 mbps up and down.
  8. Hi, I want to make an enumeration, with filtering only Digital Discovery devices. Official documentation (pdf file) says nothing about enumfilter values. In files with constants only three values are listed: #ENUMFILTER enumfilterAll = c_int(0) enumfilterEExplorer = c_int(1) enumfilterDiscovery = c_int(2) I have figured out filter for AD2 devices to be 4, but i am not able to find any filter for DD. Also I have noticed that some SDK documentation is missing or very limited.
  9. I recently ported two tutorials for Vivado 2017.4 - the actual Arty-Z7 examples are not fully ported to that version. They are available on github: The XADC demo is originally written in Verilog - because I am usually using VHDL I took this as an occasion to dig deeper into that example. Also, I added a simulation bench (which normally is the first step when creating custom logic) The second project is a port from Xilinx UG1165 tutorial using the centralized DMA IP. This was a bit tricky due to differnt RAM size and a strange error in Vivados connection automation (see that post: Wrong connection on AXI, evtl. somebody might provide ans answer?). I recommend working through UG1165, you'll learn a lot about how to use the SDK even sometimes you'll need to guess how to adapt to the Arty. There are also covered a lot of things concerning IPs and IP Integrator, so I feel, the additional time spent there is worthwhile. Please note that repositories might contain issues, I did not test to the full extend. If theres someting missing, please feel free to add or correct or leave me a message.
  10. MauroChimenti

    Petalinux-Zybo-Z7-20 project fails to build and fetch components

    Hello, I tried to upgrade python3 and git, but nothing is changed: Actually I have: python3.5 3.5.2-2ubuntu0 amd64 Interactive high-level object-oriented lang git 1:2.7.4-0ubunt amd64 fast, scalable, distributed revision contro The global git config is surely a clean empty one, because the VM is brand new (uhmm .. an empty git global config could be the issue). The global and system git configuration were empty. I created a base configuration but nothing is changed. --------------- .gitconfig ---------------------------------- [user] name = Mauro Chimenti email = -------------------------------------------------------------------- I'm sure the issue is little configuration detail somewhere. In the Xilinx forum, just like here, no one reported my issue and all describe the same steps i did. I started from a brand new VM (several times), so I really don't understand what I missed. If I try to build the Arty-z7-20 project with the 2018.2 (or 2018.1) petalinux version, i see all fetches go ahead correctly, compile 99% and finally stops with an expected insanity kernel error. All version older than 2018.1 fails (i tried 2017.4, 2017.3, 2017.2 and 2016.4) dpkg list.txt
  11. K, so it looks like you have it nailed down to petalinux 2017.4 not working on your system (since the xilinx-zc702 also seems to fail). Also, whatever issue you are running into seems to have been resolved in 2018.1. I don't like punting people to other places, but at this point I'd recommend reaching out on the Xilinx forums and seeing what they have to say. You should also try opening a support ticket with them. The fact that it seems to have been fixed in 2018.1 suggests that someone over there knows what is going on. Be sure to provide error.txt to them. We can keep trying here too... It looks like yocto has generated an invalid git command for the 5 repos that throw errors. The command tries to fetch a remote branch directly onto the current branch, which is not allowed. Perhaps the git repo is in a different state than yocto expects for some reason. Another possibility is that your git configuration is not compatible with the version of yocto present in 2017.4. Can you provide ~/.gitconfig, and any other git configuration files you might have on your system (you might want to strip them of personal info, your call)? Also, what version of git are you using?
  12. sbobrowicz

    Can't get Digilent/Petalinux-Zybo-Z7-20 to work

    Any flickering on the LEDs, or does DONE go low? What branch and commit are you checked out at? For comparison, try downloading the BSP from the release tab in github and building using that flow.
  13. sbobrowicz

    Program code on PetaLinux

    @theAsker Please provide more information about what you mean when you say you cannot write to the XADC registers. Are you receiving an error? Also, I'm not certain your addresses in the code above are correct. For one, in the commented out line where you try to enable the core, you write to address 0x02, which doesn't make sense since the registers are 32-bits (they should all be 4-byte aligned: 0x00,0x04,0x08,0x0C...)
  14. Yesterday
  15. William Smith

    Platform studio

    Image processing deals with the raw image which may include editing and adjusting it as well. Whenever I get into problems like this, I always consult with Canon Printer Tech Support and they bring me out with solutions.
  16. Hi, Using python script I want to constantly collect digital data form 6 lines (so 8 lines would be sampled) with a rate of 1MSPS, with transfer to the PC. I have read: And I am not sure if I should use record mode with data compression or scan screen mode. I suppose record mode would be best, but I don't know how to set unlimited number of samples for digital record (there is no function FDwfAnalogInRecordLengthSet for Digital inputs), as the only method to set number of samples is calling dwf.FDwfDigitalInTriggerPositionSet and dwf.FDwfDigitalInTriggerPrefillSet... At the other hand, will scan screen mode allow the sample rate of 1MSPS to be transmitted to PC? I would be grateful for any suggestions @attila. I have searched through the forum but only found mentioned discussion and some materials related to analog acquisition....
  17. Hi @attila I am using the Digilent Electronics Explorer Board. I did check the software version of WaveForms and it is v3.8.2 and I am on a Windows 7 64-bit machine. My apologies I did not include this information earlier.
  18. Header J6, should MOSI and SCK be reversed?
  19. Piotr Rzeszut

    Using Digilent Analog Discovery in Orange Pi PC PLus

    But where from the TL431 takes power? USB of Orange Pi or external power supply? I have AD2 so maybe there is an issue with AD1?
  20. I'm using AD (1), but power supply is not a problem because the isolator use an independent power supply with TL431 and BJT to supply 5V. On windows 7 x64 AD + isolator works well, just with less update because of the USB 1.2 limitation (12mbps).
  21. vishav

    timer not getting initialized

    I just figured it out. I forgot to program FPGA after I made changes in hardware design in Vivado.
  22. Hi, I want to use a GPIO and Timer Interrupt in my project. To implement it, I saw an example code, which is attached here. However, while debugging I see that my timer is not being initialized(status = XTmrCtr_Initialize(&TMRInst, TMR_DEVICE_ID);. It calls Data Abort Interrupt. The code is nearly the same as given on the following link: For Reference, my code is as follows. Also, find attached my hardware design, address editor and timer settings window. Any suggestions/help would be appreciated. /* * main.c * * Created on: 23.06.2018 * Author: vishavbansal */ #include "xparameters.h" #include "xgpio.h" #include "xtmrctr.h" #include "xscugic.h" #include "xil_exception.h" #include "xil_printf.h" // Parameter definitions #define INTC_DEVICE_ID XPAR_PS7_SCUGIC_0_DEVICE_ID #define TMR_DEVICE_ID XPAR_TMRCTR_0_DEVICE_ID #define BTNS_DEVICE_ID XPAR_AXI_GPIO_0_DEVICE_ID #define LEDS_DEVICE_ID XPAR_AXI_GPIO_1_DEVICE_ID #define INTC_GPIO_INTERRUPT_ID XPAR_FABRIC_AXI_GPIO_0_IP2INTC_IRPT_INTR #define INTC_TMR_INTERRUPT_ID XPAR_FABRIC_AXI_TIMER_0_INTERRUPT_INTR #define BTN_INT XGPIO_IR_CH1_MASK #define TMR_LOAD 0xFFFE7961 XGpio LEDInst, BTNInst; XScuGic INTCInst; XTmrCtr TMRInst; static int led_data; static int btn_value; static int tmr_count; //---------------------------------------------------- // PROTOTYPE FUNCTIONS //---------------------------------------------------- static void BTN_Intr_Handler(void *baseaddr_p); static void TMR_Intr_Handler(void *baseaddr_p); static int InterruptSystemSetup(XScuGic *XScuGicInstancePtr); static int IntcInitFunction(u16 DeviceId, XTmrCtr *TmrInstancePtr, XGpio *GpioInstancePtr); //---------------------------------------------------- // INTERRUPT HANDLER FUNCTIONS // - called by the timer, button interrupt, performs // - LED flashing //---------------------------------------------------- void BTN_Intr_Handler(void *InstancePtr) { // Disable GPIO interrupts XGpio_InterruptDisable(&BTNInst, BTN_INT); // Ignore additional button presses if ((XGpio_InterruptGetStatus(&BTNInst) & BTN_INT) != BTN_INT) { return; } btn_value = XGpio_DiscreteRead(&BTNInst, 1); // Increment counter based on button value // Reset if centre button pressed if(btn_value != 1) led_data = led_data + btn_value; else led_data = 0; XGpio_DiscreteWrite(&LEDInst, 1, led_data); (void)XGpio_InterruptClear(&BTNInst, BTN_INT); // Enable GPIO interrupts XGpio_InterruptEnable(&BTNInst, BTN_INT); } void TMR_Intr_Handler(void *data) { if (XTmrCtr_IsExpired(&TMRInst,0)){ XTmrCtr_Stop(&TMRInst,0); // Once timer has expired 3 times, stop, increment counter // reset timer and start running again //if(tmr_count == 3){ // tmr_count = 0; led_data++; XGpio_DiscreteWrite(&LEDInst, 1, led_data); //} //else tmr_count++; XTmrCtr_Reset(&TMRInst,0); XTmrCtr_Start(&TMRInst,0); } } //---------------------------------------------------- // MAIN FUNCTION //---------------------------------------------------- int main (void) { int status; //---------------------------------------------------- // INITIALIZE THE PERIPHERALS & SET DIRECTIONS OF GPIO //---------------------------------------------------- // Initialise LEDs status = XGpio_Initialize(&LEDInst, LEDS_DEVICE_ID); if(status != XST_SUCCESS) return XST_FAILURE; // Initialise Push Buttons status = XGpio_Initialize(&BTNInst, BTNS_DEVICE_ID); if(status != XST_SUCCESS) return XST_FAILURE; // Set LEDs direction to outputs XGpio_SetDataDirection(&LEDInst, 1, 0x00); // Set all buttons direction to inputs XGpio_SetDataDirection(&BTNInst, 1, 0xFF); //---------------------------------------------------- // SETUP THE TIMER //---------------------------------------------------- status = XTmrCtr_Initialize(&TMRInst, TMR_DEVICE_ID); if(status != XST_SUCCESS) return XST_FAILURE; XTmrCtr_SetHandler(&TMRInst, TMR_Intr_Handler, &TMRInst); XTmrCtr_SetResetValue(&TMRInst, 0, TMR_LOAD); XTmrCtr_SetOptions(&TMRInst, 0, XTC_INT_MODE_OPTION | XTC_AUTO_RELOAD_OPTION | XTC_EXT_COMPARE_OPTION); //XTC_INT_MODE_OPTION // Initialize interrupt controller status = IntcInitFunction(INTC_DEVICE_ID, &TMRInst, &BTNInst); if(status != XST_SUCCESS) return XST_FAILURE; XTmrCtr_Start(&TMRInst, 0); while(1); return 0; } //---------------------------------------------------- // INITIAL SETUP FUNCTIONS //---------------------------------------------------- int InterruptSystemSetup(XScuGic *XScuGicInstancePtr) { // Enable interrupt XGpio_InterruptEnable(&BTNInst, BTN_INT); XGpio_InterruptGlobalEnable(&BTNInst); Xil_ExceptionRegisterHandler(XIL_EXCEPTION_ID_INT, (Xil_ExceptionHandler)XScuGic_InterruptHandler, XScuGicInstancePtr); Xil_ExceptionEnable(); return XST_SUCCESS; } int IntcInitFunction(u16 DeviceId, XTmrCtr *TmrInstancePtr, XGpio *GpioInstancePtr) { XScuGic_Config *IntcConfig; int status; // Interrupt controller initialisation IntcConfig = XScuGic_LookupConfig(DeviceId); status = XScuGic_CfgInitialize(&INTCInst, IntcConfig, IntcConfig->CpuBaseAddress); if(status != XST_SUCCESS) return XST_FAILURE; // Call to interrupt setup status = InterruptSystemSetup(&INTCInst); if(status != XST_SUCCESS) return XST_FAILURE; // Connect GPIO interrupt to handler status = XScuGic_Connect(&INTCInst, INTC_GPIO_INTERRUPT_ID, (Xil_ExceptionHandler)BTN_Intr_Handler, (void *)GpioInstancePtr); if(status != XST_SUCCESS) return XST_FAILURE; // Connect timer interrupt to handler status = XScuGic_Connect(&INTCInst, INTC_TMR_INTERRUPT_ID, (Xil_ExceptionHandler)TMR_Intr_Handler, (void *)TmrInstancePtr); if(status != XST_SUCCESS) return XST_FAILURE; // Enable GPIO interrupts interrupt XGpio_InterruptEnable(GpioInstancePtr, 1); XGpio_InterruptGlobalEnable(GpioInstancePtr); // Enable GPIO and timer interrupts in the controller XScuGic_Enable(&INTCInst, INTC_GPIO_INTERRUPT_ID); XScuGic_Enable(&INTCInst, INTC_TMR_INTERRUPT_ID); return XST_SUCCESS; }
  23. Piotr Rzeszut

    Show both channels scale

    I am also "voting" for the improvement.
  24. Piotr Rzeszut

    Digital Discovery Stand Alone Operation

    If you are using WaveForms without a physical device (i.e. in DEMO mode) some functions are not simulated.
  25. Piotr Rzeszut

    Using Digilent Analog Discovery in Orange Pi PC PLus

    I think it may be issue with power supply. Do you have 5V power supply to power up AD2 using DC connector? As I receive my ADUM4160 isolator I will test it myself.
  26. Pseudonym1

    Zybo Vivado 2018.1 Getting started with Zynq typo

    Also, for step 6, it may be helpful to indicate where to look (upper right corner of the Vivado suite) to see the Bitstream status. I tried to proceed to step 7 when I erroniously though step 6 was done. Hopefully tool revisions don't change the location of the status too much. At least in Vivado 2018.1, the tool has a "Bitstream Generation Completed" pop-up, you might indicate to wait for this with an image of the relevant option {Open Implemented Design, View Reports, Open Hardware Manager, Generate Memory Configurations}to select. I know it's a challenge to keep up with tools that roll frequently. It might help to have a link to a version of Vivado corresponding to the guide, if Xilinx is amenable to that legacy tool link support. Also, to add/clarify to the previous post/question: Including the frame/region any icons or options are located would also help significantly. Coming from an embedded micro-controller background, there interface has many more layers of configuration than code only IDEs. I'm not always clear on which frame/tool to use for this yet.
  27. I'm trying to follow the "Getting started with Zynq" guide to bring up a Zybo board. Step 4.4 indicates "swts_4bits", but the closest option is "sws_4bits". I appreciate the guide immensely, but it might help to also include the icon locations for each step, particularly where the "Add Ip" icon is, since there are a LOT of interface options in Vivado. It may also help to have the steps in hierarchical order, even if it causes the English to be awkward. E.g. instead of "4.3) Select GPIO2 under axi_gpio_0 and select swts_4bits in the drop-down box." something like "Within the block axi_gpio_0 group GPIO2, select sws_4bits" or maybe even axi_gpio_0 -> GPIO2 -> sws_4bits Including the other block configurations (like S_AXI) would also be helpful, even if they're left with their defaults. It looks like Xilinx rolls their tools a lot, so this would help when users are on a different version. I'm new to FPGA/CPLD terms, so please excuse imprecise/wrong term/notation usage. On the other hand, thank you for making such tools so accessible!
  1. Load more activity