(10-11-2017, 08:37 AM)channaankit25 Wrote: Someone please reply.. how to configure the UART 1?. If it is already enabled then let us know which port should be used for sending & receiving data?
hi, this might be more difficult than its worth; frankly.
... many of the gpio(s) have multiple functions; there are register(s) in the SoC that control which function a given pad has ( its just a number, 0, 1, 2, ) and the default settings for the pad(s) is controlled by the dts|dtb ( device tree ) and whatever drivers are loaded often expecting a specific hardware configuration in dts|dtb.
So, you have to know what you're doing ( datasheet and user's manual for the RK3328 SoC ) and you have to know what drivers are being loaded now, and you have to understand your current dts|dtb... and frankly, its not trivial ( I don't know what your skill level is ). Also, you need to know how to disable certain drivers, and how to modify or create a specific config in device tree ( dts|dtb ).
Discussion here is complicated by the fact that most of the people reading this forum don't really understand uart(s) in general ( some are quite good at it ), and most of the readers of this forum are brand new to the Rock64 ( RK3328 is very new ). So, there is limited experience, and everyone is learning; add to that the fact that most users so far don't need this function and have not researched it yet -- including me ( and I'm somebody who uses uart(s) on these SBC(s) all the time ).
You will need to research everything that I've put above; seriously. And then you will need to be patient with the technology and with yourself, because there will be a learning curve and you're going to have to experiment a bit. If you're very patient you'll catch some soul in a generous mood who has some extra time and who may be willing to do some hand-holding. You need to know how the control registers work, and how to configure device tree ( dts|dtb ) so start there, read what you can in the user's manual and datasheet, and see what you can figure out on your own; then, come back ( here or on the irc ) and ask whatever 'specific' questions you're still not clear about...
PS. GPIO_A4 and GPIO_A6 are not listed on the pinout(s) chart as yellow ( uart Interface ) but are listed as green ( general purpose ). This is where the datasheet and user manual come in handy ( and I have not looked yet ) to find out if in fact those pins have a secondary purpose for being universal asynchronous receiver and transmitter (uart).
PSS. what would their function numbers have to be ? how would that be specified in dts|dtb ?
( I'll have to research it a bit too )
The gpio(s) are discussed at length in the TRM ( technical reference manual ) part I. chapter 18. The UART(s) are discussed at length in chapter 17 of the TRM; there are three uart(s) and yes, uart(1) uses GPIO3_A4 and GPIO3_A6; however, the IOMUX has to be set properly for this secondary function.
Start with the TRM and do some research; the uart(s) are not trivial and you may need to do some study.
I also did some looking in the TRM Part II. ( which is confidential and only disclosed upon request to certain developers ) and it seems that what you need to know is (fortunately) in part I.
Keep in mind that if you activate uart(1) you will loose those two gpio pins ( at least ) and you may also lose the rts cts pins as well; you will need to research that also.