Embedded Micro Technology MyPi User manual

Page 1
MyPi Industrial CM3+ Integrator Board
User Guide
Issue : 1.00
Dated : January 2022
Prepared By : Andrew O’Connell

Page 2
FEATURES
•Raspberry Pi Compute Module 1 & 3/3+ compatible
•Integrated 10/100 Ethernet adapter
•2 x USB 2.0 master interfaces
•Mini PCI-e Interface + SIM connector For use with cellular modems
•Ruggedised high speed USB interfaced µSD Card interface, providing additional storage
separate from the Compute Module eMMC flash
•Integrated USB RS232 UART (RX/TX/RTS/CTS) using RJ45 connector for maximum range.
•Modular IO Cards for application specific IO solutions
•Dual high-resolution Raspberry Pi camera interfaces
•Raspberry Pi 2 HAT compatible I/O connector & mounting points
•Integrated battery backed real-time-clock (RTC)
•Additional 1.6s hardware watchdog for added system resilience
•HDMI out
•2 x Bi-colour (red/green) front panel status LEDs
•8Way 2-part 3.5mm Screw terminal connector for use with modular IO card outputs or HAT
board
•Wide 7-24V (poly-fused and filtered) DC power input range
•Available in standard (0 to 70°C) and extended range (-25 to 80°C) temperature versions for
demanding environments
•Core PCB Size : 125 x 142mm

Page 3
BOARD IO FEATURES
❶
❷
❸
❹
❺
❻
❼
❽
❷
❿
⓫
⓬
⓭
⓮
⓯
⓰
⓱
⓲
⓳
❶Compute Module 1/3/3+ Socket
❷mPCIe Socket + Modem SIM Socket
❸USB µSD Card Interface + Socket
❹USB LAN9512 10/100 LAN + USB Interface
❺2 x USB 2.0 Ports
❻RJ45 RS232 Port (USB Interface)
❼I2C DS1339U-33+ RTC + Battery Backup
❽External Watchdog
❾Dual Bi-colour LED
❿GPIO IO Card interface + Front Connector
⓫Power In (9-24V DC)
⓬Raspberry Pi HAT Connector
⓭HDMI Out
⓮Dual Camera Interface
⓯Audio Out
⓰USB Hub
⓱Programming Mode Selector Link
⓲Watchdog Selector Links
⓳µUSB CM Programming port
⓴Modem Reset GPIO23 Link
❾
❹
❹
❹
❸
❿
❿⓫
⓴

Page 4
HARDWARE CONFIGURATION LINKS
LED - ACT
This LED indicates ‘Activity’ functionality on the Pi unit, by default this indicates eMMC flash access
on the module, but can be reassigned to indicate other status signals.
LK1 - WATCHDOG OUT
Fitted Connect External Watchdog Out Line to RPI RUN/RESET Line
Open Default
LK5 - WATCHDOG ENABLE
Fitted Connect External Watchdog Input Line to GPIO29*
Open Default
LK3 - WATCHDOG INPUT
Fitted Connect External Watchdog Enable to GPIO28*
Open Default
*GPIO LINES ALSO USED FOR CAMERA 0

Page 5
LK12 - mPCIe EMERGENCY RESET
Fitted Fit to connect GPIO23 to PERST (pin 22) of mPCIe socket
Open Default
LK6 - Compute Module Programming Mode (USB SLAVE BOOT MODE)
Fitted DIS Compute module programming forced as disabled
Fitted EN Compute module programming enabled (fit USB programming cable in to activate)

Page 6
LK9 - RS232 Connector 5V power Out
Fitted DIS DTR Line Floating
Fitted EN Fit to pull DTR RS232 line to +5V (default fitted)
LK8 - Green Status LED 1 Drive Source
Fitted 1-2 GPIO36 (default)
Fitted 2-3 mPCIe MODEM/WIFI Status LED Signal

Page 7
RASPBERRY PI COMPUTE MODULE PROGRAMMING
The unit as shipped is configured to allow the eMMC flash on the compute module to be re-
programmed
Demo kit units come complete with Compute modules that are pre-programmed with the demo
Raspbian OS pre-installed, this section describes how to write a new disk image to the Compute
Module.
First of all download the windows USB boot installer, this will install the device drivers as well as a
program we'll use later called RPi-Boot
Raspberry Pi RPI-BOOT Software Download Link
Connect the mini USB connector to the Windows PC using the supplied USB A to micro USB B data
cable, fit the programming mode jumper link (LK6) to EN and then power up the unit.
Windows will then show the following stages as it configures the OS :
Once that sequence has finished Windows has now installed the required drivers and you can power
off the unit for a moment whilst we get the PC side ready for the next step.

Page 8
Making sure you have the unit powered off start up RPi Boot, this is easiest done via the start menu,
we have found this needs to be run as ‘Administrator’ privilege mode for correct operation
When the RPi-Boot starts up it’ll sit and wait for the attached board to boot up :
Power up the unit and RPi-Boot will configure the unit to appear as a flash drive :
When done the compute module will alternate into mass storage mode (so behaving just as though
it's a USB memory stick) and windows will then recognise the module as an external drive.

Page 9
If the compute module eMMC already contains an OS Windows will recognise the FAT partition and
assign that (at least) a drive letter, this is useful in the event that a configuration error with the boot
files is made (e.g. dt-blob.bin or config.txt) and needs recovery actions to be performed.
After drive letter assignment Windows may indicate that partitions need scanning or fixing, these
can be ignored/cancelled.
There are a few different ways we can load on the OS, for simplicity we’ll cover using the
recommended OS writing software and process from the main Raspberry Pi website
This process writes a disk image, containing the partition table as well as both FAT boot partition and
Linux EXT partitions, over the entire disk.
The basic sequence we're following is :
1. Download the Win32DiskImager utility from this Download Link
2. Install and run the Win32DiskImager utility (You will need to run the utility as administrator,
right-click on the shortcut or exe file and select Run as administrator)
3. Select the OS image file you wish to write
4. Select the drive letter of the compute module in the device box (in our case F:) - Again note
that the disk image is a 1:1 of the entire disk (containing the partition table, FAT & EXT
partitions)
Be careful to select the correct drive; if you get the wrong one you can destroy the data on
the computer's hard disk!
5. Click Write and wait for the write to complete

Page 10
Once complete power off the unit and set the USB Boot jumper link back to Disabled, and finally
remove the USB cable.
Failing to do this will prevent the on-board USB hub from working when the board is rebooted due
to CM's USB master being still switched over to the programming socket and not the internal bus
The same utility can also create snapshot images of the current image config to save time, although
note this is a straight binary dump of the entire disk not just the parts with files in so the image files
end up quite big and take a long time to read/write
Created images can be cleaned and compressed using pishrink utility to speed up programming time
https://github.com/Drewsif/PiShrink/

Page 11
SYSTEM GPIO
These GPIO lines that have been reserved for system use, most are not accessible from other
interface connectors
The startup file /etc/init.d/mypi.sh exports these for OS usage and creates shortcut entries in /dev
for easy reference
GPIO /dev Shortcut Description Active Default
0 - CAM1 I2C (I2C0) - -
1
-
CAM1 I2C (I2C0)
-
-
20 - PSU Connector Middle Pin via LK11 (3.3V Logic) - -
21
-
CAM1 Power Enable
-
-
5 - CAM1 LED Indicator - -
22
-
CAM0 Power Enable
-
-
4 - CAM0 LED Indicator - -
28
-
CAM0 I2C / Hardware Watchdog In
-
-
29
-
CAM0 I2C / Hardware Watchdog Enable
-
-
34 sd-disable USB SD Card /Reset (Disable) Low High
35
led-red
Status LED Red
High
Low
36 led-green Status LED Green High Low
39
pcie-wdis
mPCIe Wireless Disable (Airplane mode)
High
Low
23 pcie-reset mPCIe Modem Emergency Reset (fit LK12) High Low
44
lan-disable
USB LAN /Reset (Disable)
Low
High
40
-
Audio R
-
-
45 - Audio L - -
46
-
HDMI HPD
-
-
47 - Pi Compute Module Activity LED - -
GPIO Example usage using created /dev shortcuts:
$ echo 1 >/dev/sd-disable # Reset/Disable SD Interface Chip
$ echo 0 >/dev/sd-disable # Enable SD Interface Chip
$ echo 1 >/dev/lan-disable # Reset/Disable LAN Interface Chip
$ echo 0 >/dev/lan-disable # Enable LAN Interface Chip
$ echo 1 >/dev/pcie-wdis # Disable RF output from mPCIe card
$ echo 0 >/dev/pcie-wdis # Enable RF output from mPCIe card
$ echo 1 >/dev/pcie-reset # Reset/Disable mPCIe card
$ echo 0 >/dev/pcie-reset # Enable mPCIe card
$ echo 1 >/dev/led1-red # Switch Red Status LED on
$ echo 0 >/dev/led1-red # Switch Red Status LED off
$ echo 1 >/dev/led2-green # Switch Green Status LED on
$ echo 0 >/dev/led2-green # Switch Green Status LED off

Page 12
USB SD CARD INTERFACE
The on-board micro SD Card is interfaced to the Raspberry Pi Compute Module using on-board
Microchip USB2240 SD card interface controller, providing fast access to secondary storage for
datalogging.
Configuration file /etc/udev/rules.d/8-sdcard.rules creates the below /dev shortcuts for the main
SD Card and any partitions contained (once a card is fitted)
The /dev/sdcardx reference can then be used in /etc/fstab to mount the partitions, rather than the
/dev/sdx reference to avoid clashing with other USB interfaced media
This SD card cannot be booted from however can be auto mounted at boot (via /etc/fstab) so offers
a low cost method of expanding the core eMMC filesystem
We recommend the use of industrial grade SD cards, which whist more expensive have greater
operating temperature range, on-device wear-levelling and generally greater endurance than
commercial grade parts.
For more information please see our knowledgebase article below
https://embeddedpi.com/documentation/sd-card-interface/raspberry-pi-industrial-micro-sd-cards
The SD Card interface chip gets a power up reset pulse, the below lines optionally allow you direct
control over the chip’s reset signal. Disabling the chip also reduces the system power draw.
$ echo 1 >/dev/sd-disable # Reset/Disable SD Interface Chip
$ echo 0 >/dev/sd-disable # Enable SD Interface Chip

Page 13
USB 10/100 LAN + USB CONTROLLER
Integrated on-board is an Microchip LAN9512 device, this is connected to the Raspberry Pi via the on
board USB HUB port which provides 2 additional downstream USB ports, which are brought out to
the front face USB ports.
There are two scripts that are helpful:
/usr/local/bin/resetbyauthorized.sh
This script allows you to issue a software reset command to a USB peripheral by supplying the
vendorid & productid identifiers (can be found using lsusb)
/usr/local/bin/usbpwrctl.sh
This script allows you to switch the power off/on to either/both of the front USB ports
The LAN chip gets a power up reset pulse, the below lines optionally allow you direct control over
the LAN chip reset signal.
Disabling the LAN chip also reduces the power draw of the system significantly.
Note that you should disable/bring down any LAN related interface (e.g. eth0) before disabling the
port to avoid OS related problems.
$ echo 1 >/dev/lan-disable # Reset/Disable LAN Interface Chip
$ echo 0 >/dev/lan-disable # Enable LAN Interface Chip

Page 14
USB MINI-PCIE INTERFACE
The Integrated mPCIe socket installed on the base board are wired to the below standard
Pin
Signal
Pin
Signal
1 - 2 3.3V
3
-
4
GND
5- 6 1.5V
7- 8 SIM_VCC
9
GND
10
SIM_I/O
11 - 12 SIM_CLK
13
-
14
SIM_RST
15 GND 16 SIM_VPP
Mechanical Key
17 - 18 GND
19
-
20
WDIS# (GPIO23)
21
GND
22
PERST# (GPIO39)
23 - 24 3.3V
25
-
26
GND
27 GND 28 -
29
GND
30
-
31
-
32
-
33
-
34
GND
35
GND
36
USB_D+
37 - 38 USB_D-
39
3.3V
40
GND
41 3.3V 42 LED_WWAN#
43
GND
44
LED_WLAN#
45
-
46
-
47 - 48 -
49
-
50
GND
51 - 52 3.3V
The mPCIe USB signals are connected to the on-board USB hub chip.
The WWAN/WLAN LED signals can be optionally connected to the front top green bi-colour LED, to
indicate modem network registration/data transmission status, by setting LK8 to position 2-3.

Page 15
Modem Compatibility/Operation
See the below link to pages from the main modem documentation section for details on how to
operate modems :
http://www.embeddedpi.com/documentation/3g-4g-modems
The system has been pre-installed with modem helper status script modemstat which supports
Sierra Wireless, Quectel and Simcom
See web page below for more details
https://embeddedpi.com/documentation/3g-4g-modems/mypi-industrial-raspberry-pi-3g-4g-modem-status
A number of udev rules have been added to provide consistent shortcut symbolic links for easy
identification of the various ttyUSB interfaces created by the modem. These udev rule files are
contained in the /etc/udev/rules.d/modem-rules folder.
Combined versions for SIMCOM SIM7xxx and Quectel EC2x modems are pre-installed on the demo
image
Note that increasingly modems are requiring raw ip connection method to be implemented, to this
end we have added qmi-network-raw in /usr/local/bin which makes this connection type easier
along with udhcp which supports raw ip mode for obtaining an IP address once connection has been
made.

Page 16
QMI Network Connection example :

Page 17
QUECTEL-CM example
Quectel Modems have a utility provided by Quectel to manage the connection process and which
will automatically configure any raw-ip settings
First install the all-in-one quectel-cm connection helper program; this will automatically configure
any raw-ip settings
https://github.com/mypiandrew/quectel-cm/releases/download/V1.6.0.12/quectel-CM.tar.gz
The command has the below syntax
quectel-CM [-s [apn [user password auth]]]
[-p pincode] [-f logfilename] -s [apn [user password auth]]
Example 1: ./quectel-CM
Example 2: ./quectel-CM -s pp.vodafone.co.uk
Example 3: ./quectel-CM -s internet web web 0 -p 1234 -f modemconnect.log
Note that this is a non-exiting process so will not automatically fork and run in the background

Page 18
Sample Connection output, note the fall back to raw-ip is automatic.
Killing the process or issuing Ctrl-C results in the connection to be disconnected and interface
disabled.

Page 19
mPCIe IO Cards
Also available are our range of pre-certified RF modules :
•LoRa (Microchip RN2483/RN2903)
•Bluetooth 4.0 BLE (Silicon Labs/BlueGiga BLE112)
•Bluetooth 5 (Laird BL652)
•enOcean TCM310
•ZIGBEE/802.15.4 (Silicon Labs/Telegesis RX357 Module L.R. UFL)
•XBEE
These all feature an FTDI230X USB to UART chip and so appear automatically as a standard serial
port ready to run with minimal configuration needed, so offer a fast development cycle.
In order to make the ttyUSBx serial port for the mPCIe cards above constantly easy to identify we
use a udev rule to help us, this is called 10-ftdi-usbserial.rules and is located /etc/udev/rules.d/
This udev rule creates a symlink for the FTDI ttyUSBx serial port called /dev/ttyS2
For more information on how each card works please see the respective documentation page on the
website.

Page 20
COM PORTS
There are three on board serial ports available on the MyPi base board
UART0&1 are direct from the RPi module and available on the GPIO IO card slot
An additional serial port is available via the front RJ45 connector which derived from an on board
FTDI 230XS USB-UART device.
Further serial ports can be added via either the mPCIe port or plugging additional adapters into the
front USB ports, see the table below for
Name
OS Port
Type
RTS/CTS?
UART0 /dev/ttyAMA0 PL011 Full UART Yes**
UART1
/dev/ttyS0
Mini UART
No
USB-SERIAL0 /dev/ttyS1* On Board FT230XS USB UART Yes
USB-SERIAL1
/dev/ttyS2*
mPCIe FT230XS USB UART
Yes
USB-SERIAL2
/dev/ttyS3* Top USB Port FTDI USB Serial Adapter Yes
USB-SERIAL3
/dev/ttyS4*
Bottom USB Port FTDI USB Serial Adapter
Yes
* Will appear as a ttyUSBx port, udev rules will create /dev/ttySx symlink short-cuts – see /etc/udev/rules.d
** RTS/CTS lines optional and configured via device-tree overlays (not suitable for 485 flow control)
Note that UART1 was originally intended as a serial console rather than a full featured UART, as a
result it has a few quirks in the settings it can reliably use (including baud rates being affected by the
clock rate of the CPU). For this reason care should be taken to assess its suitability for usage, for
more information see this web page : HERE
UART0 is the preferred choice when using for serial communications between devices due to having
a more complete feature set.
USB-SERIAL0 is permanently enabled as RS232 via the RJ45 socket on the front face (wired to Cisco
console cable format) to give maximum cable distance.
The GPIO pins UART0 & 1 appear on are user-definable via device tree overlays
GPIO
ALT0
ALT1
ALT2
ALT3
ALT4
ALT5
14 TX0 TX1
15
RX0
TX1
16 CTS0
17 RTS0
30
CTS0
31 RTS0
32
TX0
TX1
33 RX0 RX1
Table of contents
Popular Computer Hardware manuals by other brands

Rorke Data
Rorke Data GX4L_2120S4_12I1 Installation and hardware reference manual

Roland
Roland RSS Digital Snake S-4000H supplementary guide

Thermalright
Thermalright AXP-200R manual

ekwb
ekwb EK-FC1080 GTX FTW installation manual

Intel
Intel BX80571E7500 - Core 2 Duo 2.93 GHz Processor Programming guide

Alphacool
Alphacool ES H100 80GB HBM PCIe manual