FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits
5984 Discussions

Agilex-7 SoC Uart Driver ForBaremetal App

Balerion
Beginner
456 Views

Hi,

I am trying to develope a baremetal Uart driver for Agilex-7 SoC. While I was reading the "Agilex™ 7 Hard Processor System Technical Reference Manual" I couldn't figure out what to do to transfer data and receive data from uart peripheral step by step. I mean in a sequence what should I do? I coudn't understand that. I saw in the document that, first I need to enable the clock for Uart peripheral by writing 1 to the "l4spclken" field but then what to do to? Could you please help me?

 

Thanks,

Balerion

Labels (1)
0 Kudos
7 Replies
Balerion
Beginner
416 Views

Hi again,

If there is a linux uart driver for this device, can you share that with me? So that I can take it as a base reference to write my own baremetal uart driver?

 

Thanks,

Balerion

0 Kudos
JingyangTeh
Employee
366 Views

Hi Balerion


There is no UART Driver for baremetal app for the agilex7.

However you could add the uart into the device tree and access the uart using the linux filesystem.

You could find the example on interfacing with the uart with our Agilex7 GSRD

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


Regards

Jingyang, Teh


0 Kudos
Balerion
Beginner
359 Views

Hi Jingyang, Teh

I found out at another post of mine on the forum that there is no BSP support for baremetal application on Agilex-7. However, I want to develop a simple uart app and I don't want to use linux. In this case, I guess I need to write my own uart driver. I take Agilex-7 HPS Technical reference manual for my guidance. But I don't really find detailed information about how to make Uart Controller functional. What should I do step by step in order to develop one? Could you help about that?

 

Regards,

Balerion 

0 Kudos
JingyangTeh
Employee
271 Views

HI Balerion


Sorry there is no step by step on the creation.

You could refer to how it was done for the older device which supports baremetal.

The intel-hwlibs library was used previously for baremetal application.


e.g.

There is a main file hps.h for each device family which maps the address to the register map.(Try searching for hps.h)

https://www.intel.com/content/www/us/en/programmable/hps/cyclone-v/hps.html

You could try mapping the peripheral address to the one of Agilex7 base on its register map.

https://www.intel.com/content/www/us/en/programmable/hps/agilex7/hps.html


Regards

Jingyang, Teh





0 Kudos
JingyangTeh
Employee
177 Views

Hi


Any update on this case?


Regards

Jingyang, Teh


0 Kudos
Balerion
Beginner
162 Views

Hi Jingyang,

I have found some files for Arria 10 SoC(hps.h, socal.h, alt_uart.h, alt_printf.h, alt_16550_uart.h, alt_printf.c, alt_p2uart.c) in SoCEDS Pro directory which I've downloaded previously. I also checked that whether the uart registers of Arria 10 SoC is similar to Agilex-7 SoC and saw that they are the same. I'll try to use these files. I'm also in touch with Altera through the distributor of my board. It is up to you to close this post or not. Thanks for your support.

 

Regards,

Balerion

0 Kudos
JingyangTeh
Employee
74 Views

Hi


Since this thread been resolve, I shall set this thread to close pending. If you still need further assistance, you are welcome to reopen this thread within 20days or open a new thread, some one will be right with you. 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 4 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


0 Kudos
Reply