Results 1 to 2 of 2

Thread: What im doing wrong using the Altera UP IP core USB

  1. #1
    Join Date
    May 2018
    Posts
    3
    Rep Power
    1

    Default What im doing wrong using the Altera UP IP core USB

    Hey,
    i am using the Altera University IP core for the USB 2.0 controller. I followed the instructions here: ftp://ftp.altera.com/up/pub/Intel_Ma...Output/USB.pdf
    My FPGA is a de2-115. I created a qsys design with:
    - 50Mhz clock
    - on chip memory
    - nios2/f cpu
    - interval timer
    - system id peripheral
    - USB Controller
    - JTAG UART
    And made the pin planning in quartus, then i created a main.c file with exactly the code given in the PDF i linked. This should let me detect a usb mouse.

    The USB device is recogniced (after "alt_up_usb_open_dev" i have something with the right usb base adress). But the "alt_up_usb_setup" function never returns. Inside that function i enabled the port info and i can see on the uart terminal output:


    root_hub_port1 = 950095 root_hub_port2 = 960096
    port1_speed = 0
    port2_speed = 0
    Port 1 has USB device connected, assigning address 1...

    Even if no device is plugged in. I'm curious about the port speed of 0 and also the root_hub_port address is changing after each reset. Sometimes after reset a device HID is found but this is not an HID of a mouse and this HID is not always the same. Sadly there is not much documentation how to setup the USB core correctly regarding the pin planning and required qsys settings, so it is most likely that i'm missing something there. Two things i come over and was not sure if i did that right are:
    1. In Quartus Pin Planner i choose 3.3V LVTTL default was 2.5V but i read in the ISP1362 manual that 3.3V is used by the USB controller.
    2. I use the same clock for the usb as for the whole design (50Mhz) maybe i have to use a seperate clock with different speed?

    I also tryed something more smaller. I just assign a value to the HcScratch register and try to read that value than:
    Code:
        do
        {
            alt_up_usb_hc_reg_write_16(usb, 0x28, cnt);
            test_data = alt_up_usb_hc_reg_read_16(usb, 0x28);
    
            if(test_data!=cnt){
                printf("Error Encountered!!\n");
                printf("Write:%4X, Read:%4X\n", cnt, test_data);
                error++;
            }
            cnt++;
        } while(cnt<4);
    
        if(error==0)
        {
            printf("\nNo error!!\n");
        }
        else
        {
            printf("Total error : %d\n",error);
        }
    But the value read in the register is not the value i wrote.

    I would be grateful to any hint or advise..
    Last edited by creen; May 10th, 2018 at 07:12 AM.

  2. #2
    Join Date
    May 2018
    Posts
    3
    Rep Power
    1

    Default Re: What im doing wrong using the Altera UP IP core USB

    Incase someone else comes over a similar problem.
    I found out the version of the de2-115 which i use have not a isp1362, it have a cypress cy7c67200.

Similar Threads

  1. Replies: 4
    Last Post: September 14th, 2017, 10:59 AM
  2. Qsys ModelSim-Altera automation script .do: libraries in wrong order
    By RemyDruyer in forum Quartus II and EDA Tools Discussion
    Replies: 0
    Last Post: October 29th, 2015, 07:01 AM
  3. Replies: 2
    Last Post: March 1st, 2010, 10:43 PM
  4. wrong in ip core
    By planet1997 in forum DSP Builder and DSP IPs
    Replies: 3
    Last Post: October 10th, 2008, 12:30 AM
  5. TimeQuest Issue with wrong launch clock & wrong latch edge
    By David_Cai in forum Quartus II and EDA Tools Discussion
    Replies: 1
    Last Post: January 24th, 2008, 05:01 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •