Mahdi

Members
  • Content count

    7
  • Joined

  • Last visited

About Mahdi

  • Rank
    Newbie

Recent Profile Visitors

85 profile views
  1. How to use PmodGPS without interrupts?

    Hello, I am using Arty board to collect GPS data every second and prints it out to terminal. To do this, I modified PmodGPS example code on github which is attached (I wrote my code in C++, rather than the original code which was in C). I wanted to completely disable interrupts and poll data every second by myself, so I removed the interrupt part of the code, but apparently PmodGPS is not working without interrupts. Even though the GPS is getting a lock, I do not see any information printed out in terminal which means GPS.ping never goes to 1. Am I doing something wrong or the GPS is not actually working without interrupts? Any help is appreciated. Best, Mahdi main.cc
  2. Hi @jpeyron, Thanks for your response. I believe I have figured out where the issue is coming from. I was initializing both of PmodNAV and PmodSD inside the main function, and that was keeping the AXI_LITE_SPI busy all the time, so I was not able to use it 2 times in a row. This is how I fixed it. I put the PmodNAV code inside a separate .cc file and defined a function in there to return navigation data as an array. I did the same thing for SD card, where it was writing anything that I was passing to its function. Then in the main file, I called the PmodNAV first, and copied its output into an array and then I called the SD card function to write the same array to the card. Apparently, After calling a function in the main code, the AXI_LITE_SPI connection that is used inside that function would be free, so you are able to use it and initialize another Pmod. But when you initialize that module directly in the main code, AXI_LITE_SPI is still connected to Micrbolaze, so you are not allowed to use it for a 2nd connection. I am all set now. -Mahdi
  3. Thanks @jpeyron. Just to give you a heads up, if you are creating your SDK project in C++ which is what I did, don't forget to include these two statements at the beginning and at the end of PmodNAV.h header file, since there are some undefined reference issues between C and C++ functions for these example codes. Add this to top of PmodNAV.h #ifdef __cplusplus extern "C" { #endif and this to the end of it, and you would be fine. #ifdef __cplusplus } #endif Good luck, -Mahdi
  4. Hello, I am using Arty board attached to 2 peripheral modules (PmodSD and PmodNAV) to write navigation data to SD card. To do so, I am combining the C example codes provided on Github for each module, and simplified it a bit which is attached. My problem is that each one of the modules are working fine individually with their own code, as long as the other Pmod is not initialized in the C code, but when I am using them at the same time it destroys my output to terminal and writes zero to both terminal and SD card. I am suspicious that the issue is because PmodSD and PmodNAV are both using AXI_LITE_SPI to talk to Microblaze, and I do not have any control on SPI bus when I am writing data. As a result, Microblaze does not know how to communicate with both of Pmods at the same time. Does this make sense? What is the best way to control the AXI_LITE_SPI when there are multiple modules connected to the Microblaze? I am trying to keep this as simple as possible, so I can use the example codes. Any help is highly appreciated. -Mahdi main.cc
  5. How to connect an external ADC to AXI Quad SPI

    @D@n @artvvb Thanks Arthur and Dan for your replies. Let me explain a bit more of what I am doing. I have an external 16-bit ADC which needs to be flushed every 1 microsecond. Normally, we use a SPI to communicate with the ADC, but it seems to me the Quad SPI on Arty is not designed for such purposes. Would it make sense to hard-code this in Verilog, or is there another IP which is better for this application? Alongside this, the CPU is supposed to collect data from other Pmods as well, so I prefer not to use interrupts for this project. -Mahdi
  6. Hello guys, I am fairly new to FPGAs, but I have managed to get my Arty board to work with a bunch of Pmods through Vivado software with MicroBlaze. At this point, I am trying to use AXI Quad SPI for collecting data from an external ADC. I have my own 16-bit ADC (connected to a detector) which has an event flag pin that goes high when an event is detected. The flag is supposed to be latched high until the CPU responds and shifts out the 16-bit value. I wonder how can I implement such design inside my block diagram? I tried adding a SPI connector to my diagram, but as far as I see there is no pin on SPI block that I can connect my event flag to. Any help is highly appreciated. Mahdi