Forum Discussion

Asifa's avatar
Asifa
Icon for New Contributor rankNew Contributor
11 months ago

NIOS ii/e clock frequency differ from real-time running frequency.

I have created a Qsys circuit using Nios II/e, with a clock frequency of 50 MHz. Other peripherals are also connected, as shown in the attached photo. I wrote a program in Eclipse, and when I checked the real-time toggling of the GPIO pin, I found the ON time to be 85 microseconds and the OFF time to be 86 microseconds. However, I specified an ON time and OFF time of 1 microsecond each in the program. Could you kindly help me understand why there is such a significant difference?

20 Replies

  • tehjingy_Altera's avatar
    tehjingy_Altera
    Icon for Regular Contributor rankRegular Contributor

    Hi


    From the pin planner screenshot, could you try changing the IO standard for the clock pin to 3.3V instead of 2.5V?

    Another question is could you try increasing the delay to 10us if the delay is proportional or not?


    Regards

    Jingyang, Teh



    • Asifa's avatar
      Asifa
      Icon for New Contributor rankNew Contributor

      It's still the same with 3.3V to clock pin. If we set the delay to 1 µs, it shows 79 µs. When we increase the delay to 10 µs, it shows 89 µs.

  • tehjingy_Altera's avatar
    tehjingy_Altera
    Icon for Regular Contributor rankRegular Contributor

    Hi


    Could you check the ALT_CPU_FREQ define in the system.h file? This file should be in the output folder.

    The value should be 50Mhz, the value is used to calculate the delay in the usleep function.


    Regards

    Jingyang, Teh


  • tehjingy_Altera's avatar
    tehjingy_Altera
    Icon for Regular Contributor rankRegular Contributor

    Hi


    Do you have any update on this case?

    Did you managed to check the define of the clock in the system.h ?


    Regards

    Jingyang, Teh


  • tehjingy_Altera's avatar
    tehjingy_Altera
    Icon for Regular Contributor rankRegular Contributor

    Hi


    As we do not receive any response from you on the previous question/reply/answer that we have provided. Please login to ‘https://supporttickets.intel.com/s/?language=en_US’, view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you on your follow-up questions.



    Regards

    Jingyang, Teh