Forum Discussion

Itzthiru's avatar
Itzthiru
Icon for New Contributor rankNew Contributor
3 years ago

ARRIA 10 SOC BAREMETAL PROGRAMMING

How to toggle HPS leds in Arria 10 SoC using direct memory access?

Tools I am using: Ubuntu 20.04 in Windows Virtual box, Arm DS 2023, SoC embedded Command Shell

Board: Arria 10 SoC

Additional Info: Installation completed and bootloader is also working perfectly. Also I can able to execute sample files also.

10 Replies

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

    Hi Itzthiru


    Is the LED connected to the HPS GPIO or a PIO soft IP?

    When you connect to the PIO Soft IP you could interface it through the HPS to FPGA bridge.

    You could use the devmem tool to read the memory address starting from the HPS to FPGA bridge it is connected to , either lightweight or normal.

    You could get the base address from here:

    https://www.intel.com/content/www/us/en/programmable/hps/arria-10/hps.html


    As for the offset you could get it from the Quartus Platform Designer Tool under the Address Map Tab.



    If you have registered the GPIO in the device tree, you could view the GPIO in the linux /dev directory.



    Regards

    Jingyang, Teh



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

      Hello @JingyangTeh_Altera,

      Thank you for prompt response. I am a beginner in this Arria 10 SoC BareMetal Programming. I have completed my installation using this link: SoCEDS and ARM Development Studio | Documentation | RocketBoards.org . Now I would like to move forward with basic sample programs. I got stucked with toggling the HPS LED. Is there any possibility to toggle the LEDs connected to the HPS directly or is there any pre-configurations need to be done before doing this. If so, can you elaborate the steps and procedures to move forward with this? Also share me the latest document for installing software packages and working with BareMetal programming.

      Thanks and Regards,

      Thiru.

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

    Hi Thiru


    You could refer to this link on understanding more on the baremetal.

    https://www.intel.com/content/www/us/en/docs/programmable/683211/current/bare-metal-user-guide.html


    After understanding the flow, either booting directly to baremetal application or through uboot.

    I would suggest that you try out the hello world example in the link below.

    https://www.rocketboards.org/foswiki/Documentation/HWLib


    Lets try out booting a simple application first before interfacing with the hardware.


    Regards

    Jingyang, Teh






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

    Hello @JingyangTeh,

    Thank you. I have already completed the previous steps and stuffs that you have mentioned. I was able to run the bootloader and Altera-SoCFPGA-HelloWorld-Baremetal-A10, Altera-SoCFPGA-HardwareLib-Timer-A10 examples using Linux-GCC. Now I want to try doing the LED toggling via direct GPIO access. Help me in this regard....

    Thanks and Regards,

    Thiru.

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

      Hello @JingyangTeh,

      Thank you for sharing this resource. I'll check it with my Arria 10 and come back to you.

      Regards,

      Thiru.

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

    Hi Thiru


    Do you have any problem with the example deisgn?

    Could I close this case first?

    If you have question we could file a new case related to the specific problem you are facing.


    Regards

    Jingyang, Teh


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

    Hi


    Since there are no feedback for this thread, I shall set this thread to close pending. Please login to ‘https://supporttickets.intel.com’, 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.


    If you happened to close this thread you might receive a survey. If you think you would rank your support experience less than 10 out of 10, please allow me to correct it before closing or if the problem can’t be corrected, please let me know the cause so that I may improve your future service experience.



    Regards

    Jingyang, Teh