Configure the UART 1 for connecting Bluetooth module
#3
(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.

Blush
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
  Reply


Messages In This Thread
RE: Configure the UART 1 for connecting Bluetooth module - by MarkHaysHarris777 - 10-11-2017, 10:09 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Using multiple UART's on Rock64. ramprasad 0 937 08-29-2022, 01:22 PM
Last Post: ramprasad
  Using multiple UART's on Rock64. sachineswar 0 909 08-29-2022, 12:31 PM
Last Post: sachineswar
Lightbulb RK3399 Linux rtl8822cu module bluetooth not working shivarj89 0 1,361 07-29-2021, 07:19 AM
Last Post: shivarj89
Question bluetooth rock64 problem deta 3 5,072 05-06-2020, 11:29 PM
Last Post: deta
  Ayufan Debian Stretch Openmediavault 4 5G Wifi Not Connecting Poincare 0 2,276 03-26-2019, 07:28 PM
Last Post: Poincare
Smile Adding a new kernel module a1w.ca 1 3,096 01-07-2019, 01:57 AM
Last Post: tllim
  Bluetooth adapter from store not working in Linux/Lakka/Retroarch Poincare 0 1,863 06-26-2018, 06:34 PM
Last Post: Poincare
  free UART drekrob 2 3,179 12-18-2017, 08:40 AM
Last Post: xalius

Forum Jump:


Users browsing this thread: 1 Guest(s)