Configure the UART 1 for connecting Bluetooth module - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: ROCK64 (https://forum.pine64.org/forumdisplay.php?fid=85) +--- Forum: Linux on Rock64 (https://forum.pine64.org/forumdisplay.php?fid=88) +--- Thread: Configure the UART 1 for connecting Bluetooth module (/showthread.php?tid=5219) |
Configure the UART 1 for connecting Bluetooth module - channaankit25 - 10-05-2017 Hi, I would like to use the uart 1 for connecting the BT module. The UART 2 is used for debug or console logs. What steps should I follow to configure the UART 1 in rock64 ? I am using linux image Jessie. Do I need to configure both uboot and kernel with GPIO3_A4 as Tx and GPIO3_A6 as Rx pin?. If it is already configured then which tty port should I connect to? Can someone please give details for the same? Is there any documentation for using the GPIO, configuring peripheral drivers? Regards, Ankit Channa RE: Configure the UART 1 for connecting Bluetooth module - channaankit25 - 10-11-2017 (10-05-2017, 05:39 AM)channaankit25 Wrote: Hi, 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? RE: Configure the UART 1 for connecting Bluetooth module - MarkHaysHarris777 - 10-11-2017 (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. |