PinMuxing / UART2

Hello -

I have some real basic questions that hopefully someone can help me with. I ultimately want to be able to use my BeagleBoard-XM (Rev C) to talk to a MCU using the UART2 port on the main expansion header. I know to do this I will need to setup the PINMUX correctly. I think I can get away setting the Mux through u-boot.

Please bare with me… this is what I have spent today doing.

I have gone through the exercise of building the Angstrom Distribution using the setup-scripts ( and executing:

$ MACHINE=beagleboard ./ config beagleboard
$ MACHINE=beagleboard ./ update
$ MACHINE=beagleboard ./ bitbake virtual/kernel

From what I understand (which isn’t much) is that this will give me the latest kernel. After everything ran, I ended up with a directory where I believe the image is:

There are 2 files (modules-3.0.25-r118a-beagleboard.tgz & uImage-beagleboard.bin). I am not exactly sure what to do with these files. I was anticipating that I would end up with a MLO file, u-boot.bin, uImage, & a tarball that I would extract on the ext3 partition of the SD card. Maybe I am not looking in the correct directories? I see that the ./ script uses bitbake. Do these scripts create the u-boot.bin file? If so, can I make my pinmux changes somewhere here?

OR - do I need to download bitbake & the u-boot source code & modify the beagle.h file there?

I am somewhat lost on trying to understand all of the documents/pages/group posts that I have found. It looks like there are hard, older ways to do things, but new tools have since been created to automate some of the steps. I’m just not sure what I need to do and what has already been done for me.



bitbake u-boot

all you built with the command you gave was the kernel so that is why that is all you saw. As was mention for u-boot
bitbake u-boot
For an image an example would be
bitbake xfce-nm-image
bitbake systemd-gnome-image
poky and oe both have good resources

Thank you guys for your help! I may (will) have follow on questions later, but at least you got me pointed in the right direction.

  • Jeremy

Hey again,

Since last time, I was successfully able to get all the files I needed to get my beagleboard-xm Rev C to boot using the following commands:

$ MACHINE=beagleboard ./ config beagleboard
$ MACHINE=beagleboard ./ update
$ MACHINE=beagleboard ./ bitbake virtual/kernel
→ gave me uImage.bin
$ MACHINE=beagleboard ./ bitbake u-boot
→ gave me u-boot.img & MLO
$ MACHINE=beagleboard ./ bitbake console-image
→ produced the Angstrom tarball

So now I want to edit the beagle.h file to setup the pinmuxing (setup the uart2_RX line). It looks like the UART2_TX line is already setup, as well as the CTS/RTS, though I don’t plan on using flow control. I went to edit this file:

I went on the #beagle chat and asked if all I had to do was add the following line in the MUX_VAL(CP(MCBSP3_FSX), (IEN | PTD | DIS | M1)) /UART2_RX/\

I was told that the preferred method to do pinmuxing now was actually through the kernel (modify the following file):


Is that the case or does it matter? From what I have read on and other pages I get the impression that its actually much easier to do in u-boot.

So If it doesn’t matter, then back to my original question: do I just add the one line to the MUX_BEAGLE_XM macro?

And finally, how the heck can I prove this is working? Based on some other uart2 questions I have read, they state that you can short pins 6 & 8 on the expansion header (uart2 TX/RX if you have them mux’d correctly) and issue the following:
$ echo a > /dev/ttyS1
then see if there are any changes in the file:

RX and TX pins on the expansion header are muxed as UART2 by default
right now, you can check that in /sys/kernel/debug/omap_mux:
# cat uart2_tx mcbsp3_fsx
name: uart2_tx.uart2_tx (0x48002178/0x148 = 0x0000), b aa25, t NA
signals: uart2_tx | mcbsp3_clkx | gpt11_pwm_evt | NA | gpio_146 | NA |
NA | safe_mode
name: mcbsp3_fsx.uart2_rx (0x48002172/0x142 = 0x0101), b ae5, t NA
signals: mcbsp3_fsx | uart2_rx | NA | NA | gpio_143 | hsusb3_tll_data7

NA | safe_mode

This comes from these lines in beagle.h in u-boot:
and then they are not re-muxed in kernel

The OMAP UARTs are /dev/ttyO*, not ttyS*
test using:
tail -f /dev/ttyS1 &
echo a > /dev/ttyS1

Thank you Igor! This is exactly the info I needed. I really appreciate it.