Finding the serial (UART) pinout on KF

Search This thread

csholmq

Senior Member
Dec 23, 2010
85
87
Gothenburg
How to find the UART
Thanks to jamez70's, we now know where the serial pins are.

Here is where the UART pins sits on the back of the motherboard.
attachment.php

(Courtesy of ifixit photo and jamez70's illustration)

The pins from 1-4 are:
RX TX GND GND (where #4 is marked)

From probing, we can detect the 1V8 level signal and the baud rate of 115200.
attachment.php

(Courtesy of jamez70)

If you want to hook this up, I suggest you solder on some wires to the pads and run the wires to the front, making life easier to re-assemble the KF.

I suggest you get something like the Breakout Board for FT232RL USB to Serial for hooking this up. Note that the KF is 1V8, so when you want to connect this unit (default 3V3), you may want to use a level shifter, or simply find the VCC on the KF and loop that back that through the VCCIO on the Sparkfun-converter. Sending 3V3 directly into the KF could possibly seriously hurt it!

If you want to construct a simple voltage divider, simply get two resistors and get your soldering gun out. According to Vout = Vin * Rb/(Ra+Rb)
volt.jpg

Voltage divider circuit (courtesy of calculatoredge.com)

  • Vin: 3V3
  • Vout: 1V8
  • Ra: 10 kOhm
  • Rb: 12 kOhm

If you need more UART details, here are some tips:
  • Baud: 115200
  • Bits: 8
  • Parity: None
  • Stop Bits: 1

Background
In the work to get a booting 3.0 kernel on the KF we need some low level access to debug since the USB initializes way later in the kernel sequence. I did some research on the OMAP4430 (the CPU in our dear KF) to try and find out where the UART interface might be accessed.

Looking at the datasheet we get a feeling of all the ball points ("pins") on the CPU. (Observe that this is seen from under the CPU)

attachment.php

OMAP4430 ball bottom layout

By then looking at the UART table TX pin numbers I try to get a feel where they might be located on the chip.

attachment.php

UART 1, 2, 3, 4 table

Finally, I cross referenced the UART table with TX pin and physical position on the board. The colors represent UART 1 TX, UART 2 TX and UART 4 TX. UART 3 doesn't seem likely to be mapped.

attachment.php

UART 1, 2 and 4 TX pin guesses

Observe that these are all estimates, but should narrow the search down (unless they're mapped somewhere way outside of the CPU area that is). I haven't had a chance of testing any of my guesses yet, but I thought I'd at least post my thoughts to get the ball running.
 

Attachments

  • OMAP4430_TX_guesses.jpg
    OMAP4430_TX_guesses.jpg
    60.2 KB · Views: 7,807
  • kindlefire2.jpg
    kindlefire2.jpg
    108.7 KB · Views: 7,012
Last edited:

csholmq

Senior Member
Dec 23, 2010
85
87
Gothenburg
I'd put money on the four solder pads near the edge on the back (lcd facing) side.

Where exactly? Could you describe more in detail? If you're referring to the ones on the right, I'm pretty sure they are for the two speakers.

SejZs5a65UTRcAYv.large

Courtesy of iFixit.net

I opened my attempted to probe my KF one more time today. It was a close call where I tried finding the TX amongst the bigger solder pads and a spark went off. Luckily, an unplug/plug of the battery connector booted it right up again. My probes on my multimeter are waaay to big for all the small dots. Hopefully, somebody has some more fitting equipment for the task.
 
Last edited:

csholmq

Senior Member
Dec 23, 2010
85
87
Gothenburg
I'd be willing to shave my pet poodle that he means the four solder pads in the middle on the right side of your image.

Yeah, I just realised that I had been flipping it the wrong way in my head :) The pads on that side looks very promising! I'm not sure how I'm gonna test out the pads without disconnecting everything from the board. Our best bet is probably to solder some wires and test directly on them. Won't do that on my KF atm though. Too dependant on it for my lecture slides :)
 

Buffet_of_Lies

Senior Member
Dec 22, 2011
121
39
Boston
Yeah. I don't blame you. I'm a big fan of circuit-bending but you usually use old junky electronics, not a brand new state-of-the-art device like this. Not really willing to go near this thing with my soldering iron at this point. But something else I noticed is that on a photo of the OTHER side of that board... there's a serialnumber/MAC address sticker right smack on top of where those four solder pads are. Totally screaming in an attempt to hide where the traces are going!

Something else of interest is the closeup photo of the wifi/bt chip:
DRFN3fKhw3X5vWYE.medium


What I've long suspected is that the bluetooth isn't wired onto the motherboard. Looking at the image you posted above it's on the upper left side and darned if I don't see some empty component spaces!
 
  • Like
Reactions: nind

csholmq

Senior Member
Dec 23, 2010
85
87
Gothenburg
Yeah. I don't blame you. I'm a big fan of circuit-bending but you usually use old junky electronics, not a brand new state-of-the-art device like this. Not really willing to go near this thing with my soldering iron at this point. But something else I noticed is that on a photo of the OTHER side of that board... there's a serialnumber/MAC address sticker right smack on top of where those four solder pads are. Totally screaming in an attempt to hide where the traces are going!

Something else of interest is the closeup photo of the wifi/bt chip:
DRFN3fKhw3X5vWYE.medium


What I've long suspected is that the bluetooth isn't wired onto the motherboard. Looking at the image you posted above it's on the upper left side and darned if I don't see some empty component spaces!
I'm no kernel dev. But for those who are, it would certainly be worth looking under the sticker! Assuming the UART is TTL, I recommend getting Teensy USB dev board or something similar. Certainly helps with the debugging. I have one and it works great (it's compatible with the Arduino IDE).
 

pokey9000

Senior Member
Apr 17, 2007
767
396
Austin
I'm no kernel dev. But for those who are, it would certainly be worth looking under the sticker! Assuming the UART is TTL, I recommend getting Teensy USB dev board or something similar. Certainly helps with the debugging. I have one and it works great (it's compatible with the Arduino IDE).

The Teensy's great, and would probably work if you're running it at 3.3V. The serial port on the Fire should be 1.8V, and the ATMEGA32U4 at 3.3V should have a suitable input threshold. I recommend though getting an FT232R breakout board from Sparkfun if you're going to be hacking serial ports onto modern embedded gadgets. I've heard that the Bus Pirate works too, but I thought the buffer doesn't go down that low.

As for missing components and bluetooth, there are only a couple of no-pop discretes, and some that look like a pull-up/pull-down select. I wouldn't count BT out just yet.
 

csholmq

Senior Member
Dec 23, 2010
85
87
Gothenburg
The Teensy's great, and would probably work if you're running it at 3.3V. The serial port on the Fire should be 1.8V, and the ATMEGA32U4 at 3.3V should have a suitable input threshold. I recommend though getting an FT232R breakout board from Sparkfun if you're going to be hacking serial ports onto modern embedded gadgets. I've heard that the Bus Pirate works too, but I thought the buffer doesn't go down that low.

As for missing components and bluetooth, there are only a couple of no-pop discretes, and some that look like a pull-up/pull-down select. I wouldn't count BT out just yet.

Sure, but the Teensy has analog inputs aswell. So as long as it's below 5 V you should be able to use it to read serial. Even though the KF is just at 1.8 V.

Edit: Actually, it looks like it reads high signal in above 0.7*Vcc, which makes 3.3V a no go - as with the Teensy :/ At least with proper serial communication.
 
Last edited:

csholmq

Senior Member
Dec 23, 2010
85
87
Gothenburg
I stand corrected.

I see. I read your post in the other thread now. You referred to your USB charger? Yeah, that sounds about right. The KF is 1.8 Volts though.

When you talk about Amps (current) you almost always talk about "max current". I.e maximum discharge current from the battery or maximum load current from charger adaptor.

Btw, I found a great piece of looking breakout board. UART to USB micro for basically no money at all! It can be driven on either 3V3 (standard with jumper), 5V (from USB) or Vcc directly from device (1.8, 3.3 etc etc).

Now I just need to find a KF motherboard. All the broken screen units gets hogged on Ebay...
 
Last edited:

pokey9000

Senior Member
Apr 17, 2007
767
396
Austin
Btw, I found a great piece of looking breakout board. UART to USB microUART to USB for basically no money at all! It can be driven on either 3V3 (standard with jumper), 5V (from USB) or Vcc directly from device (1.8, 3.3 etc etc).

Now I just need to find a KF motherboard. All the broken lcd units gets hogged on Ebay...

That's exactly the one I was referring to. I've used mine on a Nook Color and Nook Tablet (both 1.8V I/O) and it works great.
 

csholmq

Senior Member
Dec 23, 2010
85
87
Gothenburg
Chatted some with Hashcode on IRC. He found lines suggesting UART 3.

Code:
11:55 <@Hashcode> if ((up2->pdev->id == CONSOLE_UART)
11:55 <@Hashcode> #define CONSOLE_UART UART3

As I didn't find any dots likely to be mapped next to the CPU, this might suggest that they are actually mapped somewhere else. Easy to access maybe?

So our best bet atm are the 4 pads on the right middle back ("under" the touch controller). I would love to have a look under the MAC sticker on the top. To see if it hides something interesting.

attachment.php

UART 3 (serial) pads estimates. TX/RX/GND/VCC (not in order)
 

Attachments

  • OMAP4430_UART.jpg
    OMAP4430_UART.jpg
    47.4 KB · Views: 1,865

csholmq

Senior Member
Dec 23, 2010
85
87
Gothenburg
Chatted some more, this time with UberDuper. He gave me some hands on proof that all 4 UART are defined and UART2 is actually up and running!

I was afraid that if everything was disabled, it would severely obstruct finding the port. I'll try to get my hands on some tech as soon as I can to have a look.

# cat /proc/interrupt
Code:
102:	0	0	GIC  serial idle
103:	0	0	GIC  hsi_dma_mpu
104:	0	0	GIC  serial idle
105:	0	0	GIC  serial idle
106:	16	0	GIC  serial idle, OMAP UART2

# dmesg
Code:
<6>[0.201904] omap-hsuart.0: ttyO0 at MMIO 0x4806a000 (irq = 104) is a OMAP UART0
<6>[0.202148] omap-hsuart.1: ttyO1 at MMIO 0x4806c000 (irq = 105) is a OMAP UART1
<6>[0.202362] omap-hsuart.2: ttyO2 at MMIO 0x48020000 (irq = 106) is a OMAP UART2
<6>[1.437225] console [ttyO2] enabled
<6>[1.441101] omap-hsuart.3: ttyO3 at MMIO 0x4806e000 (irq = 102) is a OMAP UART3
 

ttabbal

Senior Member
Jul 1, 2009
2,076
723
Samsung Galaxy S21 Ultra
A thread popped up yesterday that seemed to be relevant to this one.

KF Serial Port

Apparently you all were right about it being at the 4 pads on the right side... but what next?

Now we need kernel devs to connect up to it and get the 3.x Android kennel booting. Hashcode said he's getting the gear for it. I've got some stuff that should work, so I might get into it as well. I'm pretty busy though, so not sure how much I can contribute...

What's the voltage level this CPU uses for serial? 1.8? If it can take 3.3 on those pins, I'm good to go. If not, I might need to toss a level shifter in there...
 

death2all110

Senior Member
Sep 21, 2010
515
295
Illinois
A thread popped up yesterday that seemed to be relevant to this one.

KF Serial Port

Apparently you all were right about it being at the 4 pads on the right side... but what next?

Now we need kernel devs to connect up to it and get the 3.x Android kennel booting. Hashcode said he's getting the gear for it. I've got some stuff that should work, so I might get into it as well. I'm pretty busy though, so not sure how much I can contribute...

What's the voltage level this CPU uses for serial? 1.8? If it can take 3.3 on those pins, I'm good to go. If not, I might need to toss a level shifter in there...
OP in the thread link UrticantOwl posted said 3.3v and I plan on getting the gear soon. Probably from sparkfun or something.
 
  • Like
Reactions: doantri

Top Liked Posts

  • There are no posts matching your filters.
  • 19
    Hey, can you give us any infos on the progress?
    is everything working as expected, does the serial console really work and is helpful? would be interesting to hear if ;)

    Sure!

    The UART Serial is working it's magic and up until a couple of days ago, we were able to see how the kernel was unpacked and the bootloader handing it off with
    Code:
    Starting kernel …
    
    Uncompressing Linux… done, booting the kernel.
    but after that it went blank. Hashcode then enabled CONFIG_DEBUG_LL and the kernel starting spewing it's guts :)

    So piece by piece, the kernel is booting further and further. No screen yet, so the UART is still neccessary for development. Atm I believe it's the charging regulator causing most problems. So that needs to be tackled.

    Just a reminder: No, there's no ETA. When there's something to show, it'll be posted.
    8
    How to find the UART
    Thanks to jamez70's, we now know where the serial pins are.

    Here is where the UART pins sits on the back of the motherboard.
    attachment.php

    (Courtesy of ifixit photo and jamez70's illustration)

    The pins from 1-4 are:
    RX TX GND GND (where #4 is marked)

    From probing, we can detect the 1V8 level signal and the baud rate of 115200.
    attachment.php

    (Courtesy of jamez70)

    If you want to hook this up, I suggest you solder on some wires to the pads and run the wires to the front, making life easier to re-assemble the KF.

    I suggest you get something like the Breakout Board for FT232RL USB to Serial for hooking this up. Note that the KF is 1V8, so when you want to connect this unit (default 3V3), you may want to use a level shifter, or simply find the VCC on the KF and loop that back that through the VCCIO on the Sparkfun-converter. Sending 3V3 directly into the KF could possibly seriously hurt it!

    If you want to construct a simple voltage divider, simply get two resistors and get your soldering gun out. According to Vout = Vin * Rb/(Ra+Rb)
    volt.jpg

    Voltage divider circuit (courtesy of calculatoredge.com)

    • Vin: 3V3
    • Vout: 1V8
    • Ra: 10 kOhm
    • Rb: 12 kOhm

    If you need more UART details, here are some tips:
    • Baud: 115200
    • Bits: 8
    • Parity: None
    • Stop Bits: 1

    Background
    In the work to get a booting 3.0 kernel on the KF we need some low level access to debug since the USB initializes way later in the kernel sequence. I did some research on the OMAP4430 (the CPU in our dear KF) to try and find out where the UART interface might be accessed.

    Looking at the datasheet we get a feeling of all the ball points ("pins") on the CPU. (Observe that this is seen from under the CPU)

    attachment.php

    OMAP4430 ball bottom layout

    By then looking at the UART table TX pin numbers I try to get a feel where they might be located on the chip.

    attachment.php

    UART 1, 2, 3, 4 table

    Finally, I cross referenced the UART table with TX pin and physical position on the board. The colors represent UART 1 TX, UART 2 TX and UART 4 TX. UART 3 doesn't seem likely to be mapped.

    attachment.php

    UART 1, 2 and 4 TX pin guesses

    Observe that these are all estimates, but should narrow the search down (unless they're mapped somewhere way outside of the CPU area that is). I haven't had a chance of testing any of my guesses yet, but I thought I'd at least post my thoughts to get the ball running.
    3
    My spark fun device should be here in a day or so. Fun times!
    2
    One messed up battery pin and a freshly built kernel later.
    11:26 <@Hashcode> **** YES
    11:27 <@Hashcode> I have kernel output
    :)
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone