UART Pinout

Search This thread

mali100

Senior Member
Jun 3, 2007
209
140
I finally found some time to inspect the NST board for a spare UART and the search was successful!

The serial port can be accessed on U2713, pin 2 is RX, pin 3 is TX, device node is /dev/ttyS1.

I use it with a 3.3V USB-to-UART adapter, but any voltage between 1.2 and 3.6 should be fine, thanks to the TI voltage-level translator TXB0104.

There is also a second uart connected to J151 (ttyS0), but that one has no voltage-level-translator and runs with 2V. (TX is on pin 9 of J151, no idea where RX is).

I'm still trying to redirect the boot console to ttyS1, i think i have to recompile uboot.

/edit:
Patching u-boot worked, I have the boot console on ttyS1.
 

Attachments

  • nst_tty1.jpg
    nst_tty1.jpg
    250.6 KB · Views: 2,216
  • uboot_ttyS1.zip
    85 KB · Views: 306
Last edited:

mali100

Senior Member
Jun 3, 2007
209
140
Good job!

I wanted to look for this sometime, but you beat me to it.
I wanted to do this since my last failed kernel porting attempt. I hope it helps me debugging non succesfully booting configurations.

ttyS0 is for the (cell phone) radio
ttyS1 is for the Bluetooth.
Is that an actual android standard, or just some leftovers from the reference platform the nst and nook color are based on (the remains in the init.rc)?

Could the connector place there be for JTAG?
I think the JTAG is more probably on J151 together with ttyS0, than on U2713.
ttyS0 was the standard console, and it would make more sense that the J151 was used as debug-port.
 
  • Like
Reactions: bisbal

ApokrifX

Senior Member
May 23, 2011
468
50
The serial port can be accessed on U2713, pin 2 is RX, pin 3 is TX, device node is /dev/ttyS1.

I use it with a 3.3V USB-to-UART adapter, but any voltage between 1.2 and 3.6 should be fine, thanks to the TI voltage-level translator TXB0104.
Mali,
My USB-to-UART adapter needs 3.3V (to set “upper voltage” level)
Could you help, where can I get in on Nook board?
 

mali100

Senior Member
Jun 3, 2007
209
140
Mali,
My USB-to-UART adapter needs 3.3V (to set “upper voltage” level)
Could you help, where can I get in on Nook board?
You can use pin 1 of U2713, it's connected to VCCb on the TXB0104. Altough the voltage is disabled when the nook sleeps, but that shouldn't be a problem.
 

Renate

Recognized Contributor / Inactive Recognized Dev
I haven't had a driving need to use this until I tried an upgrade to 1.2 and got a boot loop.

There are various versions of u-boot.bin.
The easiest way to patch it is to simply search for ttyS0 and replace the two occurrences with ttyS1.

ttyS0 appears also in env.txt inside uRamdisk (and uRecRam).

I found a old fax that has the 10 pin connector that fits on the Nook.
I might try to put it on. For now I have the soldered wires.

In any case, the 1.2 boot loops and the last message is:
Code:
binder: 988:1039 transaction failed 29189

I've screwed with a lot of things on my Nook, but the "update" should have wiped about everything.
 
  • Like
Reactions: bisbal

bisbal

Senior Member
Nov 19, 2011
64
13
Excellent setup, especially for the ribbon cable! It seems something nice its going to happen in the next days :)
 

Renate

Recognized Contributor / Inactive Recognized Dev
Just a bit of an update.
If you want to do your own level shifting you've got access to two UARTs.
The MSP stuff is I2C to the MSP430 microprocessor that handles the touch screen.
You could eavesdrop on that and have a little multitouch pad.
I'm still trying to see which of the rest of the pins are for JTAG on U151.
The other 4 pins on U2713 are 3.3 level but don't come from the TXB0104 level shifter.
 
Last edited:
  • Like
Reactions: bisbal

Renate

Recognized Contributor / Inactive Recognized Dev
I've looked at this a bit and I've determined that using UART2 is a dead end.
The TXB0104 is neither powered nor enabled until late in the boot sequence.
Using the default UART1 is a much better choice.
Yes, you could modify things to use UART2 over UART1 but it's an uphill battle.

u-boot has a nice command interface where you can do lots of stuff (edited a bit):
Code:
Texas Instruments X-Loader 1.41 (Dec  7 2012 - 14:34:26)
Starting OS Bootloader from EMMC ...

U-Boot 1.1.4-carbon1.2_1.2.1.24^{} (Dec  7 2012 - 14:34:22)

OMAP3630-GP rev 2, CPU-OPP2 L3-165MHz
OMAP3621-Gossamer 1.2 Version + mDDR (Boot NAND)
DRAM:  256 MB
In:    serial
Out:   serial
Err:   serial
Hardware arch: GOSSAMER rev: EVT3
Power button is not pressed
pmic watchdog time 0
Power Button Active
gossamer charger init
Booting from eMMC

OMAP36XX GOSSAMER # help
?       - alias for 'help'
autoscr - run script from memory
base    - print or set address offset
battery   - gas gauge BQ27520 info
bdinfo  - print Board Info structure
boot    - boot default, i.e., run 'bootcmd'
bootd   - boot default, i.e., run 'bootcmd'
bootm   - boot application image from memory
calc    - perform mathematical operation
charger   - charger BQ24073 info
clock   - Manage system clocks
cmp     - memory compare
coninfo - print console devices and information
cp      - memory copy
crc32   - checksum calculation
date    - get/set/reset date & time
echo    - echo args to console
epd tests dspon dspoff image1 image2
exit    - exit script
fastboot- use USB Fastboot protocol
fatinfo - print information about filesystem
fatload - load binary file from a dos filesystem
fatls   - list files in a directory (default /)
fatsave - save binary file to a dos filesystem
ggflash - flash bq27500 from .dffs script
go      - start application at address 'addr'
gpio   - set/display gpio pins
help    - print online help
ibatck  - used to track battery id
ibus    - Select i2c Bus
icrc32  - checksum calculation
iloop   - infinite loop on address range
imd     - i2c memory display
iminfo  - print header information for application image
imm     - i2c memory modify (auto-incrementing)
imw     - memory write (fill)
inm     - memory modify (constant address)
iprobe  - probe to discover valid I2C chip addresses
itest   - return true/false on integer compare
loadb   - load binary file over serial line (kermit mode)
loads   - load S-Record file over serial line
loady   - load binary file over serial line (ymodem mode)
loop    - infinite loop on address range
md      - memory display
mm      - memory modify (auto-incrementing)
mmcinit - initialize mmc
mmc     - Read/write/Erase mmc
mspflash- used to flash a new msp430 firmware file
mtest   - simple RAM test
mw      - memory write (fill)
nm      - memory modify (constant address)
printenv- print environment variables
reset   - Perform RESET of the CPU
run     - run commands in an environment variable
saveenv - save environment variables to persistent storage
setenv  - set environment variables
setenvmem  - set environment variable from memory
sleep   - delay execution for some time
test    - minimal test like /bin/sh
version - print monitor version
OMAP36XX GOSSAMER #
 
  • Like
Reactions: bisbal

kfazz

Senior Member
Jun 24, 2010
296
615
Heres a quick hack to talk to uboot over UART2
Edit: all that's different is enabling the TXB0104 by setting gpio 37 high instead of low.
and redefining the uarts so 2 is used instead of 1.
includes the OP's patch so kernel logs show after boot also.
 

Attachments

  • uboot_UART2.diff
    1.8 KB · Views: 62
Last edited:

kfazz

Senior Member
Jun 24, 2010
296
615
this second version fixes autoboot. UART2 gets a spurious byte which needs to be cleared otherwise autoboot never works.
This patch is meant to be applied without the first one, i put the uart numbers back to normal and just changed the index of which gets used for console.
I also enabled ^C checking for the case where bootdelay is zero, you can't lock yourself out of u-boot by messing with the env variables. ( Guess why I decided to do this? :)

NB: There is a third uart, uart3. one of the sets of pins it can be muxed onto are the usbhs0_data0 and 1 pins.
these go to the tps65921, which also has a uart mode , whereby we could have uart access over the usb pins without cracking the case.
droid phones had something similar, called emu-uart. i will look into this more when i get a nook with a working usb port.
 

Attachments

  • uart2_redux.diff
    2.6 KB · Views: 50

Top Liked Posts

  • There are no posts matching your filters.
  • 9
    I finally found some time to inspect the NST board for a spare UART and the search was successful!

    The serial port can be accessed on U2713, pin 2 is RX, pin 3 is TX, device node is /dev/ttyS1.

    I use it with a 3.3V USB-to-UART adapter, but any voltage between 1.2 and 3.6 should be fine, thanks to the TI voltage-level translator TXB0104.

    There is also a second uart connected to J151 (ttyS0), but that one has no voltage-level-translator and runs with 2V. (TX is on pin 9 of J151, no idea where RX is).

    I'm still trying to redirect the boot console to ttyS1, i think i have to recompile uboot.

    /edit:
    Patching u-boot worked, I have the boot console on ttyS1.
    2
    Out of curiosity, what does this mean?

    This gives you access to serial ports.
    You can use them for console access to low-level boot stuff or a shell.
    You could also use it for interfacing to a GPS module.

    More pins added to the diagram.
    2
    Just a short update:
    I soldered in the connector successfully. It looks nice.
    The level converter to standard 9 pin "RS-232" is simple and cheesy, 2 resistors and a transistor.
    It works fine though. I can see the boot up.
    After that I can switch to logcat over ADB over USB.
    2
    Just adding the battery pinout to the diagram for completeness.
    1
    Good job!

    I wanted to look for this sometime, but you beat me to it.
    I wanted to do this since my last failed kernel porting attempt. I hope it helps me debugging non succesfully booting configurations.

    ttyS0 is for the (cell phone) radio
    ttyS1 is for the Bluetooth.
    Is that an actual android standard, or just some leftovers from the reference platform the nst and nook color are based on (the remains in the init.rc)?

    Could the connector place there be for JTAG?
    I think the JTAG is more probably on J151 together with ttyS0, than on U2713.
    ttyS0 was the standard console, and it would make more sense that the J151 was used as debug-port.