Monday, June 17, 2013

Measy U2C HW serial console pins

A hardware serial console is a little module soldered to at least two pin pads of a CPU (in this case the RK3066 of the Measy U2C stick) in order to transmit to a PC the stick's boot log sequence happening long before the screen turns on.

Naturally, if a kernel (like the latest one) refuses to boot and does not even get to turn on the screen, the only way to debug the reason is to use the serial console.

With the indications and the useful blogpost (for MK808) of fellow developer Omegamoon, I set out to find the two pins necessary to watch in my PC the boot sequence, that is:

- TXD: the pin where the CPU outputs the console text
- Ground: the necessary reference for the electrical levels in TXD

These had to be connected to the RXD and GND pins, respectively, of a hardware serial-to-USB module, that is then plugged to a PC's USB port. If anybody wonders about the CPU's RXD pin, it is not necessary unless you want to send commands to the stick once it's booted.

In the PC I myself use Ubuntu's CuteCom console app, connecting to serial port /dev/ttyUSB0 at 115200 bauds 8 bits data, 1 bit stop, no parity, and no handshake.


The way in which I found the RK3066's TXD pin was by trial and error. But since I saw there were small circular pads around the same area where Omegamoon had found his stick's TXD/RXD, I supposed mine should be close.

Hence, I first soldered the ground cable to the micro USB port on top of the RK3066 CPU and started very carefully making the serial-to-USB module's RXD pin's cable touch the different pads while powering on the stick, until I found the one that was transmitting data: TXD and proceeded to solder the cable and make the smallest possible hole in the Measy U2C's enclosure to get the two cables out of it while closed.

For reference, these are the places where the cables to the serial-to-USB are soldered
TXD pad of RK3066 (to RXD on serial-to-USB) and GROUND on the Micro USB connector

The TXD pad looks tiny but with a bit of care and a little bit of solder tin on the cable tip and the solder tip, you'll get good results.


3 comments:

  1. I want to sincerely thank you for posting this. I spent a whole afternoon looking for the UART pads and was fooled by the three you see on the bottom.

    Do you have any idea where the RXD pad is or how I might go about finding it? It could be useful for interactive u-booting.

    Note: I actually have a slightly different board, the B13. It has an external antenna connector on the top right corner of the board but otherwise looks identical to your picture.

    ReplyDelete
    Replies
    1. I bet it's one of the three pads above the CPU, and if I had to say one, I'd say it's the bigger, the one at the left.

      Please let me know your results here, even if for the B13 :)

      Delete
  2. I want to thank you *again*. I got the serial console up, including the RXD pad, exactly where you thought it was! It drops right into a shell too, which was pleasantly surprising for me (I've never done this before with an android device).

    This was the first time I have *ever* soldered anything and it was a bit tricky. But this means if I can do it, anyone can.

    I have some pretty bad pictures here:

    https://plus.google.com/photos/114789724026928496939/albums/5892871551016325745

    Feel free to update your much better picture with the now confirmed location of the RXD pad.

    Some notes for others soldering noobies:

    * what worked best for me was to put the tiniest bit of flux on the pad, then tin the pad, then tin the wire, and finally heat up the pad and the wire together with the iron.
    * i used the middle circular pad on the bottom of the board for ground and (lazily) have not soldered it.
    * for the wires, I cut an old USB cable and harvested the tiny wires from inside (the breadboard wires I have are not flexible enough).
    * i applied really tiny globs of flux with a toothpick; i think it helped a bit.
    * if you haven't done this before: be patient and watch lots of youtube videos about SMD soldering; this took me a whole afternoon but I enjoyed it. I was using a $15 radioshack 30w iron and somehow managed to not fry the board. YMMV.

    ReplyDelete

Note: Only a member of this blog may post a comment.