Weevil

Members
  • Content Count

    44
  • Joined

  • Last visited

About Weevil

  • Rank
    Frequent Visitor

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Weevil

    cmod-A7 SPI-bootloader starts with second connection

    Hi @jpeyron, thank you so much!!! Its starting up save now. I changed the following settings in my project: - Set SPI Mode to "Standard" - Select configuration mode "Master SPI x1" Cheers, Weevil
  2. Weevil

    cmod-A7 SPI-bootloader starts with second connection

    Hi @jpeyron i did, nothing changed...
  3. Weevil

    cmod-A7 SPI-bootloader starts with second connection

    Hi @jpeyron Jon, i tryed a delay of 500ms in my SDK code similar as @BYTEMAN suggested in the post (https://forum.digilentinc.com/topic/9532-cmod-a7-35t-quad-spi-memory-question-and-peripheral-interfacing/). The difference in my code is the delay is before the while loop: int main() { MB_Sleep(500); while(1) { //do some stuff } } With this i still have the problem. As you suggested i use compressed bitstream and commented out verbose. For a test i tryed with verbose (it does not effect the problem) and got the position where the bootloader fails. Sometimes it works and its looking like this: Greetings, Weevil
  4. Weevil

    cmod-A7 SPI-bootloader starts with second connection

    Hi @jpeyron, programming with JTAG and -> launch on Hardware(System debugger) works fine, but i would need to start the program when the board gets power on. Actual the FPGA is programed by the SPI-flash on startup (control with a led). The problem is, the bootloader is sometimes not started. Is there a possbibility to adjust the startup sequence or can something else cause such error? ...if i manual program the FPGA with the bootloader.elf it runs every time without problems and the bootloader is loading the program from the spi-flash... Thanks you for your help! Greetings.
  5. Hi all, i did the tutorial "How To Store Your SDK Project in SPI Flash" (https://reference.digilentinc.com/learn/programmable-logic/tutorials/htsspisf/start) and everything works fine. ...But now i recognise when, i connect the Cmod-A7 to my USB-port, the FPGA is programmed but the bootloader does not start the C-programm i created in the SDK. If i now disconnect and connect it again, the bootloader starts the C-programm and everything works fine. Maybe someone know how to handle this?
  6. Weevil

    SPI-Flash CmodA7-35T Vivado 2017.3

    Hi Jon @jpeyron, got it, i had changed the linker script of the boot-loader to the axi_emc.... Before i didn't catch this because my old download.bit from the previous standard bootloop was there and i didn't recognise the error... Sorry for wasting your time and thank you very much for your patience! Greetings!
  7. Weevil

    SPI-Flash CmodA7-35T Vivado 2017.3

    Hi Jon @jpeyron, I direct used your design and deleted the sdk folder only and expoerted the hardware with bitstream. Please find attached screenshots. Maybe this error would be interesting: ERROR: [Updatemem 57-153] Failed to update the BRAM INIT strings for C:\Projekte\MSX\FPGA\testo\cmoda7_qspi.sdk\boot_spi\Debug\boot_spi.elf and C:/Projekte/MSX/FPGA/testo/cmoda7_qspi.sdk/design_1_wrapper_hw_platform_0/design_1_wrapper.mmi.
  8. Weevil

    SPI-Flash CmodA7-35T Vivado 2017.3

    @jpeyron I copied the board files in the folder "C:\Xilinx\Vivado\2017.3\data\boards\board_files" and started the project with the CmodA7 board. (working with windows 10) The interrupts i maybe would need in a further step, but for now i deleted them. I figured out, when i follow the whole instruction of the tutorial i get to the point to program the FPGA with the choosen .elf file. On this step i get the following error message. If i start it with the standard bootloop file it works an creates the download.bit file. But this file does not include the .elf datas and after i generated this download.bit file i can not replace it with my bit-file+spi_loader.elf...
  9. Weevil

    SPI-Flash CmodA7-35T Vivado 2017.3

    Hi Jon @jpeyron, thank you so much for your example! Your example works for me, but actual i did not get why my design does not work. I am using the board files and follow before your "How To Store Your SDK Project in SPI Flash". Actual i expect some failure in my microblaze design. Thanks again!
  10. Weevil

    SPI-Flash CmodA7-35T Vivado 2017.3

    Hi all, i tryed to do the "How To Store Your SDK Project in SPI Flash" tutorial but i do not get it to work. Everything seems to be successful, but after rebooting the CmodA7 the .elf program i created does not start. During creating the project i followed the instruction from the attached post. (https://reference.digilentinc.com/learn/programmable-logic/tutorials/htsspisf/start) Additional i tryed to merge the .bit and .elf file with Vivado like the tutorial (https://techmuse.in/creating-and-configuring-xilinx-fpga-with-mcs/). Programming the fpga manual works, but if i try to write it in the flash the .elf program does not start. After programing the flash the bitstream is out of date (i don't know why). Maybe someone have an idea what i can do to get the merged bit file or mcs file on the spi-flash? Attached is my vivado project folder (http://www.mediafire.com/file/bq3ebw7b2dfpf72/Test_Microblaze.zip/file)
  11. Weevil

    32bit data transfer using uartlite

    @xc6lx45 and @Notarobot thank you very much for your comments. I will further try the thing you suggest. For the first step i got a solution by looking at the "x00" and reordering my results from the uart with it. In future i want do to something like wfjmueller posted in this thread, but for doing that i have to learn many things before https://forum.digilentinc.com/topic/1053-arty-schematics-missing-ft2232-component/ Python code: import numpy as np import sys import serial buffersize = 512 byte_number = 4 ser = serial.Serial( port='COM6',\ baudrate=921600,\ parity=serial.PARITY_NONE,\ stopbits=serial.STOPBITS_ONE,\ bytesize=serial.EIGHTBITS,\ timeout=0) for u in range(20): #read serial buffer s = ser.read(buffersize) data_left = ser.inWaiting() s += ser.read(data_left) for i in range(len(dataSerial)): if (dataSerial[i] == 0): j = 0 frame = bytearray() else: frame.append(dataSerial[i]) j = j+1 if (j>3): dataSerialFormated = int.from_bytes(frame, byteorder='little', signed = True) bufferToSend[k] = dataSerialFormated k=k+1 frame = bytearray() j= 0 bufferToSend = bufferToSend[bufferToSend!=0]
  12. Weevil

    32bit data transfer using uartlite

    @xc6lx45 I did a test to add some "x00" value before sending the 32 bit value in my SDK and print out the result of the python script. So in my result sometimes there is a shift, which i expect cause the wrong values. So i will orientate the start of an 4 bit value at the "x00". Maybe there is some other, smarter possibility? SDK code: int XAxiDma_Poll_Uart(u16 DeviceId) { int Status, Index; int Tries = NUMBER_OF_TRANSFERS; u32 *RxBufferPtr; u32 *RxPacket; u8 BytesSent; u8 emptyvalue = 111; RxBufferPtr = (u32 *) RX_BUFFER_BASE; RxPacket = (u32 *) RX_BUFFER_BASE; //MAX_PKT_LEN = 16 (in byte) -> uart max 16 byte for (Index = 0; Index < MAX_PKT_LEN_WORDS; Index ++) { RxBufferPtr[Index] = 0xCC; } /* Flush the SrcBuffer before the DMA transfer, in case the Data Cache is enabled*/ Xil_DCacheFlushRange((u32)RxBufferPtr, MAX_PKT_LEN); Status = XAxiDma_SimpleTransfer(&AxiDma, (u32) RxBufferPtr, MAX_PKT_LEN, XAXIDMA_DEVICE_TO_DMA); if (Status != XST_SUCCESS) {return XST_FAILURE;} while (XAxiDma_Busy(&AxiDma, XAXIDMA_DEVICE_TO_DMA)) {/* Wait*/} /* Invalidate the TestBuffer before receiving the data, in case the Data Cache is enabled*/ Xil_DCacheInvalidateRange((u32)RxPacket, MAX_PKT_LEN); char* p = RX_BUFFER_BASE; int nRem = sizeof(RxPacket); XUartLite_Send(&UartLite, emptyvalue, sizeof(emptyvalue)); while (nRem){ //send data to uart int nProc = XUartLite_Send(&UartLite, p, nRem); nRem -= nProc; p += nProc; } return XST_SUCCESS; }
  13. Weevil

    32bit data transfer using uartlite

    @xc6lx45 Thanks for your response! I tryed your suggestion to call the send function again, but it changed nothing in the result. In the next step i will try your 2nd suggestion to plot against an ideal sine wave.
  14. Weevil

    32bit data transfer using uartlite

    Hi all, actual i try to transfer a data stream from the DMA via uart to my PC. In my design an DDS-compiler generates a 32bit sine wave, which should be transfered via uart and read by a python script. The general data transfer works, but sometimes i get some noisy signal. This signal happens also when using a lower sample rate. For the uart data transfer actual i did not add any marker where the 32 bit value begins or ends. So i expect this is the problem, but i don't know how to include this in my SDK and python code. Maybe any suggestion? (The FPGA design is similar to my previous post https://forum.digilentinc.com/topic/8966-axi-dma-timing/?page=0#comment-26920 using the Cmod A7) Plot of the result with pyqtgraph: SDK code: int XAxiDma_Poll_Uart(u16 DeviceId) { int Status, Index; int Tries = NUMBER_OF_TRANSFERS; u32 *RxBufferPtr; u32 *RxPacket; u8 BytesSent; RxBufferPtr = (u32 *) RX_BUFFER_BASE; RxPacket = (u32 *) RX_BUFFER_BASE; for (Index = 0; Index < MAX_PKT_LEN_WORDS; Index ++) { RxBufferPtr[Index] = 0xCC; } /* Flush the SrcBuffer before the DMA transfer, in case the Data Cache is enabled*/ Xil_DCacheFlushRange((u32)RxBufferPtr, MAX_PKT_LEN); Status = XAxiDma_SimpleTransfer(&AxiDma, (u32) RxBufferPtr, MAX_PKT_LEN, XAXIDMA_DEVICE_TO_DMA); if (Status != XST_SUCCESS) {return XST_FAILURE;} while (XAxiDma_Busy(&AxiDma, XAXIDMA_DEVICE_TO_DMA)) {/* Wait*/} /* Invalidate the TestBuffer before receiving the data, in case the Data Cache is enabled*/ Xil_DCacheInvalidateRange((u32)RxPacket, MAX_PKT_LEN); //send data to uart BytesSent = XUartLite_Send(&UartLite, RX_BUFFER_BASE, sizeof(RxPacket)); while (XUartLite_IsSending(&UartLite)) {/*Wait*/} return XST_SUCCESS; } Python code: import numpy as np import sys import serial buffersize = 512 byte_number = 4 ser = serial.Serial( port='COM6',\ baudrate=921600,\ parity=serial.PARITY_NONE,\ stopbits=serial.STOPBITS_ONE,\ bytesize=serial.EIGHTBITS,\ timeout=0) for u in range(20): #read serial buffer s = ser.read(buffersize) #convert to integer for i in range (int(len(s)/byte_number)): res_value = dataSerial[(i*byte_number):((i+1)*byte_number)] value = int.from_bytes(res_value, byteorder='little', signed = True) dataSerialFormated = np.append(dataSerialFormated, value)
  15. Weevil

    FFT

    @xc6lx45 Thank you very much! Yes i know, this i will do in another function after transfering the data to my computer.