Hobrasoft:4x232

From eLinux.org
Revision as of 06:42, 25 March 2015 by Hobrasoft (talk | contribs) (Specifications)
Jump to: navigation, search

Descriptions

The Hobrasoft 4x232 Cape provides four RS232 serial ports and real time clock with batery backup. Board is powered from 5V power supply, protected with transil and fuse. Board colides with built-in graphics card so it is impossible to use the 4x232 and HDMI output at the same time.

Specifications

Followings are some specifications of the 4x232 Cape:

Power 5V via own connector
Indicators Power LED
Switches EEPROM write protect switch
EEPROM address switch

Software Support

Getting started

Required setup

  • BeagleBone Black
  • 4x232 board
  • 5V power supply - use included connector, be carefull about the polarity

Following the instructions below to start using your 4x232 Cape:

  1. Mount the BeagleBone Black to the connectors of the 4x232 Cape. The network connector should be oriented to the right side of the 4x232 board (battery is mounted in lower left corner).
  2. Mount included connector to your 5V DC power supply, for proper polarity check label on the board.
  3. Plug in a 5V DC power supply to the DC connector on the 4x232 board
  4. Install software support

Software installation - easy way

Debian package can be installed to the Beaglebone's operating system (Debian Linux, armhf architecture) for simple use of the 4x232 board. The package contains:

  • systemd script for real time clock
  • firmware for 4x232 board (file dtbo)
  • udev rules to create special devices /dev/ttyA to /dev/ttyD (corresponds with labels on the board)

For easy installation and upgrades add a line to the /etc/apt/sources.list file:

deb [arch=armhf] http://debian.hobrasoft.cz hobrasoft non-free

Then install the package from the command line:

apt-get update
apt-get install hobrasoft-4x232

Software installation: serial ports - detailed description

We strongly recommend you to use the debian package.

Open the /boot/uboott/uEnv.txt file in text editor and add or uncomment the following line:

##Disable HDMI
optargs=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN

Download and compile the .dts file:

dtc -O dtb -o /lib/firmware/HOBRASOFT-4x232-00A0.dtbo -b 0 -@ HOBRASOFT-4x232-00A0.dts

Open the /etc/default/capemgr file in text editor and add the following line:

CAPE=HOBRASOFT-4x232

Reboot the BeagleBone Black. Now the HDMI should be disabled and the serial ports /dev/ttyO? should be visible in /dev directory.

Software installation: real time clock - detailed description

We strongly recommend you to use the debian package.

Create executable script in /usr/share/rtc-mcp7941x/clock_init.sh:

#!/bin/sh

sleep 10
echo mcp7941x 0x6f > /sys/class/i2c-adapter/i2c-1/new_device
hwclock -s -u -f /dev/rtc1
hwclock -wu -f /dev/rtc0

Add this script to your startup environment. Debian in BeagleBone Black uses systemd. Create the service file /lib/systemd/system/rtc-mcp7941x.service

[Unit]
Description=MCP7941x RTC Service

[Service]
Type=simple
WorkingDirectory=/usr/share/rtc_mcp7941x
ExecStart=/bin/sh clock_init.sh
SyslogIdentifier=rtc_mcp7941x

[Install]
WantedBy=multi-user.target

Enable and start the service:

systemctl enable rtc-mcp7941x.service
systemctl start  rtc-mcp7941x.service