CooCox Embedded Pi User manual

Embedded Pi User Manual
Rev. 1.0 Release: 2013-05-06
Website: www.coocox.org
Forum: forum.coocox.org
Techinal: master@coocox.com
Market: market@coocox.com

1
Catalog
Embedded Pi User Manual................................................................................................................0
Catalog ..............................................................................................................................................1
1 Introduction ..............................................................................................................................3
2 Key Features..............................................................................................................................4
3 Hardware Layout and Configuration .........................................................................................5
3.1 Block Diagram ...............................................................................................................5
3.2 ESD Precautions ............................................................................................................7
3.3 MCU ..............................................................................................................................8
3.4 Power ............................................................................................................................8
3.4.1 Power Supply.....................................................................................................8
3.4.2 Power Pins.........................................................................................................9
3.5 ArduinoTM Form-factor Compatibility............................................................................9
3.5.1 Power section..................................................................................................10
3.5.2 Analog section.................................................................................................10
3.5.3 ICSP/ SPI ..........................................................................................................10
3.5.4 Digital section..................................................................................................11
3.6 Embedded Pi Extended Interfaces ..............................................................................12
3.6.1 Custom Section................................................................................................12
3.6.2 Analog Section.................................................................................................13
3.6.3 Digital Section..................................................................................................13
3.7 Raspberry Pi Connector...............................................................................................14
3.8 Program the Embedded Pi ..........................................................................................15
3.8.1 ISP mode .........................................................................................................15
3.8.2 External Debugger Mode ................................................................................16
3.9 Button..........................................................................................................................17
3.10 LED ..............................................................................................................................17
3.11 System Clock Source....................................................................................................18
3.12 Jumper.........................................................................................................................18
4 Operation Modes ....................................................................................................................19
4.1 STM32/Standalone Mode ...........................................................................................19

2
4.1.1 Hardware connections ....................................................................................19
4.1.2 Software Resources.........................................................................................20
4.2 ST-Adapter Mode ........................................................................................................22
4.2.1 Hardware Connections....................................................................................23
4.2.2 Software Resources.........................................................................................24
4.3 Raspberry Pi Mode......................................................................................................24
4.3.1 Hardware Connections....................................................................................26
4.3.2 Software Resources.........................................................................................26
5 Getting Started........................................................................................................................27
6 Schematics ..............................................................................................................................41
7 References...............................................................................................................................45
7.1 Cortex-M3 ...................................................................................................................45
7.2 STM32 .........................................................................................................................45
7.3 CooCox ........................................................................................................................45
7.4 Raspberry Pi ................................................................................................................46
7.5 ArduinoTM ....................................................................................................................46

3
1Introduction
Figure 1-1 Embedded Pi board
Embedded Pi is a triple-play platform for Raspberry Pi, ArduinoTM and 32-bit embedded ARM.
Blending all three communities together, Embedded Pi helps you to get the most out of each
platform. The Embedded Pi is based on the STMicroelectronics STM32F103 MCU, and can
operate as a bridge between Raspberry Pi and ArduinoTM shields and in standalone mode as a
Cortex-M3 evaluation board.
Depending on the jumper placement on the Embedded Pi, you can select each of the three
modes of operation:
STM32/Standalone Mode
The Embedded Pi works as an ArduinoTM form-factor compatible mother board where the
STM32 controls the ArduinoTM shields directly without the use of Raspberry Pi. More…
ST-Adapter Mode
The STM32 controls the ArduinoTM shields, and the Raspberry Pi works as the GUI or
command line console to send commands/data to and receive data from the STM32. More…
Raspberry Pi Mode
The Embedded Pi works as a hardware connection bridge between Raspberry Pi and
ArduinoTM shields, allowing the Raspberry Pi to interface directly with existing ArduinoTM
shields. More…

4
The figure below shows the hardware connections of different modes.
Figure 1-2 Hardware connections of 3 operation modes
2Key Features
Provides Raspberry Pi with easy access to abundant ArduinoTM shields.
‒Compatible with both 5V and 3.3V ArduinoTM shields, selectable with jumpers
‒Hundreds of ArduinoTM shields available on the market enhance the control capability
of Raspberry Pi, e.g. to control Motor, sensors, etc.
Brings 32-bit ARM MCU into the world of ArduinoTM.
‒32-bit ARM Cortex-M3 STM32F103 MCU operating at 72MHz, with 128KB Flash, 20KB
RAM, motor control, USB, and CAN
‒Hundreds of ArduinoTM shields available on the market with extremely portable drivers
provided or to be shared by CooCox and CoFans
‒A complete set of FREE CooCox tools for ARM development
‒A common footprint next to ArduinoTM footprint for connection with expansion
daughter cards which will be developed by CooCox
Raspberry Pi and the STM32 MCU can work independently or in conjunction with each
other to control the ArduinoTM shields or other accessories.

5
3Hardware Layout and Configuration
3.1 Block Diagram
STM32
STM32
IO PWM PWM IO PWM IO TX RX
PWM- PWM+ PWM- PWM+ CTS2 RTS2 TX2 RX2
SCL SDA AREF GND SCK MISO MOSI SS PWM IO
SCL2 SDA2 IO IO SCK2 MISO2 MOSI2 SS2 CANTX CANRX
Embedded Pi Analog Input External InterfaceEmbedded Pi MCU ISP(Program Interface)
Arduino Power Interface Arduino ADC Interface
RPI Connecter
USB Micro-B
DC-005
(7V –16V)
STM32
Debug
Connecter
Bus Switch & 3V3/5V Voltage-level translate
IIC
SPI
UART
PWM
CAN
ADC
GPIO
IIC/SPI/UART/PWM/
ADC/GPIO/CAN
IIC/SPI/UART/
PWM/GPIO
Raspberry Pi
Connector
Embedded Pi On
Board MCU
Arduino-Compatible
Embedded Pi Board
3 Power Source
(auto Switch)
-----------------
External DC
USB
RPI_5V
Embedded Pi Extended Interfaces:
1 SPI, 1 I2C, 1 UART with Flow Ctrl,
2 Pairs PWM(+-),6 Analog Input,
1 CAN
Arduino Form-factor Compatible
Interfaces:
1SPI, 1I2C, 4PWM, 1 UART,
6 Analog Input
Figure 3-1 Hardware block diagram
Besides the ArduinoTM form-factor compatible interfaces onboard, Embedded Pi has some
additional SPI, IIC, UART interfaces, and some other extended interfaces like USB and CAN.
Users can use the MCU onboard or a connected Raspberry Pi to control ArduinoTM shields via the
ArduinoTM form-factor compatible interfaces. The following sections give a detailed introduction
of the operation modes and interfaces of Embedded Pi: 4 Operation Modes, 3.5 ArduinoTM
Form-factor Compatibility, 3.6 Embedded Pi Extended Interfaces, and 3.7 Raspberry Pi
Connector.
Embedded Pi has 3 power sources from which the power supply is auto-selected –USB
connection, an external DC power supply, or a Raspberry Pi. For more information, refer to 3.4
Power MCU.

6
Embedded Pi contains an ARM Cortex-M3 MCU STM32F103RBT6 which belongs to STM32 F1
series of mainstream MCUs.
The STM32 F1 is a series of mainstream MCUs covering the needs of a large variety of
applications in the industrial, medical and consumer markets. With this series of products, ST has
pioneered the world of ARM® Cortex™-M microcontrollers and set a milestone in the history of
embedded applications. High performance with first-class peripherals and low-power,
low-voltage operation is paired with a high level of integration at accessible prices with a simple
architecture and easy-to-use tools.
The features of STM32F103RBT6 are listed below:
32-bit with ARM Cortex-M3 core running at up to 72MHz.
128KB Flash for programming, 20KB SRAM.
Embedded Internal RC 8MHz and 32 kHz, Real-Time Clock.
16-bit Timers with Input Capture, Output Compare and PWM.
16-bit 6-ch Advanced Timer, 2 16-bit Watchdog Timers, SysTick Timer
Rich communication interfaces: 2 SPI, 2 I2C, 3 USART
USB 2.0 Full Speed Interface, CAN 2.0B Active
2 12-bit 16-ch A/D Converter
Figure 3-2 Embedded Pi board layout

7
GND
AREF
P
O
W
E
R
A
N
A
L
O
G
D
I
G
I
T
A
L
D
I
G
I
T
A
L
SPI
ID
0
15
ID
16
21
12
14
8
7
ID
9
10
11
13
1
6
3
5
42
3V3
VIN
5V
GND
NC
IOREF
RESET
GND
ID
22
27
ID
28
39
45
40
ID
3V3
RX1
NC
GND
BOOT0
BOOT1
RESET
TX1
NOTE:
1
25
2
26
Embedded Pi Extended
Interface
Arduino form-factor
compatible Interface
Raspberry Pi Interface
Figure 3-3 Pin IDs of the connectors
3.2 ESD Precautions
Please note that the Embedded Pi board comes without any
case/box and all components are exposed. Therefore, extra
attention must be paid to ESD (electrostatic discharge) precautions.
Please make sure there is no static interference when using the
board. Appropriate ESD protections must be taken and wearing
electrostatic equipment is recommended, such as wearing an
anti-static wristband.
ESD damage can range from subtle performance degradation to
complete device failure. Precision integrated circuits may be more
susceptible to damage because very small parametric changes
could cause the device not to meet its published specifications.

8
3.3 MCU
Embedded Pi contains an ARM Cortex-M3 MCU STM32F103RBT6 which belongs to STM32 F1
series of mainstream MCUs.
The STM32 F1 is a series of mainstream MCUs covering the needs of a large variety of
applications in the industrial, medical and consumer markets. With this series of products, ST has
pioneered the world of ARM® Cortex™-M microcontrollers and set a milestone in the history of
embedded applications. High performance with first-class peripherals and low-power,
low-voltage operation is paired with a high level of integration at accessible prices with a simple
architecture and easy-to-use tools.
The features of STM32F103RBT6 are listed below:
32-bit with ARM Cortex-M3 core running at up to 72MHz.
128KB Flash for programming, 20KB SRAM.
Embedded Internal RC 8MHz and 32 kHz, Real-Time Clock.
16-bit Timers with Input Capture, Output Compare and PWM.
16-bit 6-ch Advanced Timer, 2 16-bit Watchdog Timers, SysTick Timer
Rich communication interfaces: 2 SPI, 2 I2C, 3 USART
USB 2.0 Full Speed Interface, CAN 2.0B Active
2 12-bit 16-ch A/D Converter
3.4 Power
3.4.1 Power Supply
Like the ArduinoTM mother boards, Embedded Pi can be powered via USB connection or with an
external DC power supply. Besides, a connected Raspberry Pi can also supply power to it. The
power supply is auto-selected from these 3 sources.
External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery. The
adapter can be connected by plugging a 2.1mm center-positive plug into the board's power jack.
Leads from a battery or other DC power supply can be inserted in the GND and VIN pin headers
of the POWER connector.
Raspberry Pi can supply power to Embedded Pi by connecting P1 on Raspberry Pi with the
Raspberry Pi connector (J5) on the Embedded Pi board via the 26-pin IDC cable in the package.
Embedded Pi can operate on an external supply of 6 to 20 volts. If supplied with less than 7V,
however, the 5V pin may supply less than five volts and the board may be unstable. If using more

9
than 12V, the voltage regulator may overheat and damage the board. The recommended range is
7 to 12 volts.
Note: Embedded Pi has 3.3V and 5V outputs for power supply, selectable by JP1. You need to
check and select which output to use every time when powering on the stacked ArduinoTM
shields.
3.4.2 Power Pins
The power pins of Embedded Pi are fully compatible with those of ArduinoTM form-factor and
listed as below:
VIN.
VIN is a voltage input pin connected to the input of the voltage conversion chip onboard
outputting 5V.
As VIN is connected to the power jack with a diode between them, the voltage on the pin
will be the same with the external power if any, ranging from 7 to 12V as recommended
above.
5V.
This is a 5V output pin with 2 voltage sources: 5V from USB connection, or an onboard
voltage conversion chip if using a 7 to 12V external DC power supply.
Note: Please do not input any external power directly to the pin, or your board can be
damaged.
3V3.
This is a 3.3V output pin extended from an onboard voltage conversion chip.
GND.
Ground pins.
3.5 ArduinoTM Form-factor Compatibility
Embedded Pi has ArduinoTM form-factor compatible interfaces onboard, which provide easy
access to controlling the ArduinoTM shields.
We have defined a digital ID for each signal as the name of the pin.

10
3.5.1 Power section
Figure 3-4 Pin-outs of ArduinoTM form-factor power interfaces (left side of the dotted line)
3.5.2 Analog section
ArduinoTM form-factor compatible interfaces include 6 analog inputs, 2 of which have a multiple
function for IIC communication.
However, the 2 IIC pins have no analog input function on the Embedded Pi board. The specific IO
mapping of the pins are as below:
Table 3-1 IO mapping of ArduinoTM form-factor analog interfaces
Pin ID
ArduinoTM Function
STM32 IO MAP
MCU Peripheral Function
16
AIN
PC0
PC0/ADC10
17
AIN
PC1
PC1/ADC11
18
AIN
PC2
PC2/ADC12
19
AIN
PC3
PC3/ADC13
20
I2C.SDA
PB7
PB7/I2C1_SDA/TIM4_CH2/USART1_RX
21
I2C.SCL
PB6
PB6/I2C1_SCL/TIM4_CH1/USART1_TX
3.5.3 ICSP/ SPI
Among ArduinoTM form-factor compatible interfaces, several digital IO and ICSP pins can also be
used as SPI interface by multiplexing. Embedded Pi has full compliance with ArduinoTM on these
pins. The specific IO mapping of the ICSP pins are as below:
Table 3-2 IO mapping of ArduinoTM form-factor ICSP interface
ArduinoTM Pin
ArduinoTM Function
STM32 IO MAP
MCU Peripheral Function

11
ICSP.1
SPI.MISO
PB14
PB14/SPI2_MISO/USART3_RTS/TIM
1_CH2N
ICSP.2
NC
NC
ICSP.3
SPI.SCK
PB13
PB13/SPI2_SCK/USART3_CTS/TIM1
_CH1N
ICSP.4
SPI.MOSI
PB15
PB15/SPI2_MOSI/TIM1_CH3N
ICSP.5
NC
NC
ICSP.6
GND
NC
3.5.4 Digital section
ArduinoTM form-factor compatible interfaces include 16 digital IOs, which can also access 1 UART,
1 SPI, and 6 PWM signals by multiplexing. Embedded Pi has full compliance with ArduinoTM on
these pins. The specific IO mapping of the digital pins are as below:
Table 3-3 IO mapping of ArduinoTM form-factor digital interfaces
Pin ID
ArduinoTM Function
STM32F103 IO MAP
MCU Peripheral Function
0
UART.RX
PC11
PC11/USART3_RX
1
UART.TX
PC10
PC10/USART3_TX
2
EXT.INT
PC12
PC12/USART3_CK
3
EXT.INT / PWM
PC6
PC6/TIM3_CH1
4
PC7
PC7/TIM3_CH2
5
PWM
PC8
PC8/TIM3_CH3
6
PWM
PC9
PC9/TIM3_CH4
7
PD2
PD2/TIM3_ETR
8
PA15
PA15/JTDI/TIM2_CH1_ETR/SPI1_NSS
9
PWM
PA8
PA8/USART1_CK/TIM1_CH1/MCO
10
SPI.CS
PB12
PB12/SPI2_NSS/I2C2_SMBAI/USART3_CK
/TIM1_BKIN
11
SPI.MOSI
PB15
PB15/SPI2_MOSI/TIM1_CH3N
12
SPI.MISO
PB14
PB14/SPI2_MISO/USART3_RTS/TIM1_CH
2N
13
SPI.CLK
PB13
PB13/SPI2_SCK/USART3_CTS/TIM1_CH1
N

12
AREF
NC
GND
GND
GND
14
I2C.SDA
PB7
PB7/I2C1_SDA/TIM4_CH2/USART1_RX
15
I2C.SCL
PB6
PB6/I2C1_SCL/TIM4_CH1/USART1_TX
Note: To use D8 (Pin ID 8), you need to connect SJ1 to D8 with electric iron and solders.
1
3
STM32-PA15
D8
JP2-TDI
2
SJ1
3.6 Embedded Pi Extended Interfaces
The Embedded Pi extended interfaces beyond the ArduinoTM form-factor compatible interfaces
provide stronger control ability on expansion modules. The expanded pins, from D22 to D45,
including 1 SPI, 1 I2C, 1 UART with flow control, 2 pairs of PWM (+-), 6 analog inputs, and 1 CAN,
are introduced by 3 sections below.
3.6.1 Custom Section
This section is customized according to the features of MCU. It includes BOOT0 and BOOT1, the
special pins of STM32F103RBT6, and 2 pins with multiple functions including PWM and UART.
The UART function is for ISP download, which works together with BOOT0 and BOOT1.
Figure 3-5 Embedded Pi extended custom interfaces (right side of the dotted line)
Table 3-4 IO mapping of Embedded Pi extended custom interfaces
Pin ID
Embedded Pi Function
STM32F103 IO Map
MCU Peripheral Function
26
PWM.P
PA9
PA9/USART1_TX/TIM1_CH2
28
PWM.P
PA10
PA10/USART1_RX/TIM1_CH3

13
3.6.2 Analog Section
Embedded Pi extended interfaces include 6 analog inputs, 4 of which shared the same MCU
interface with the ArduinoTM form-factor compatible interfaces due to the limited analog inputs
of STM32F103RBT6. The specific IO mapping of the analog pins are as below:
Table 3-5 IO mapping of Embedded Pi extended analog interfaces
Pin ID
Embedded Pi Function
STM32F103 IO Map
MCU Peripheral Function
40
Analog
PC0
PC0/ADC10
41
Analog
PC1
PC1/ADC11
42
Analog
PC2
PC2/ADC12
43
Analog
PC3
PC3/ADC13
44
Analog
PC4
PC4/ADC14
45
Analog
PC5
PC5/ADC15
3.6.3 Digital Section
Embedded Pi extended interfaces include 16 digital IOs, which can also access 1 UART with flow
control, 2 pairs of differential PWM, 1 CAN, 1 SPI, and 1 IIC. The specific IO mapping of the digital
pins are as below:
Table 3-6 IO mapping of Embedded Pi extended digital interfaces
Pin ID
Embedded Pi Function
STM32F103 IO Map
MCU Peripheral Function
22
UART.RX
PA3
PA3/USART2_RX/ADC3/TIM2_CH4
23
UART.TX
PA2
PA2/USART2_TX/ADC2/TIM2_CH3
24
UART.RTS
PA1
PA1/USART2_RTS/ADC1/TIM2_CH2
25
UART.CTS
PA0
PA0-WKUP/USART2_CTS/ADC0/TIM2
_CH1_ETR
26
PWM.P
PA9
PA9/USART1_TX/TIM1_CH2
27
PWM.N
PB0
PB0/ADC8/TIM3_CH3/TIM1_CH2N
28
PWM.P
PA10
PA10/USART1_RX/TIM1_CH3
29
PWM.N
PB1
PB1/ADC9/TIM3_CH4/TIM1_CH3N
30
CAN.RX
PB8
PB8/TIM4_CH3/I2C1_SCL/CANRX
31
CAN.TX
PB9
PB9/TIM4_CH4/I2C1_SDA/CANTX

14
32
SPI.SS
PA4
PA4/SPI1_NSS/USART2_CK/ADC4
33
SPI.MOSI
PA7
PA7/SPI1_MOSI/ADC7/TIM3_CH2/TI
M1_CH1N
34
SPI.MISO
PA6
PA6/SPI1_MISO/ADC6/TIM3_CH1/TI
M1_BKIN
35
SPI.SCK
PA5
PA5/SPI1_SCK/ADC5
36
PC13
PC13/ANT1_TAMP
37
PB5
PB5/I2C1_SMBAI/TIM3_CH2/SPI1_M
OSI
38
I2C.SDA
PB11
PB11/I2C2_SDA/USART3_RX/TIM2_C
H4
39
I2C.SCL
PB10
PB10/I2C2_SCL/USART3_TX/TIM2_C
H3
3.7 Raspberry Pi Connector
Raspberry Pi Connector (JP5) includes 17 digital IOs, which also have the function of IIC, SPI, or
UART. As the ArduinoTM form-factor compatible interfaces include only 16 digital IOs, pin 26 of
the Raspberry Pi is ignored on Embedded Pi. Below is the IO remapping of Raspberry Pi interfaces
on Embedded Pi board.
Table 3-7 IO remapping of Raspberry Pi interfaces
Note: Dn (n=1.2.3 …) stands for Digital Pin x.
Raspberry-Pi
Interface Pin ID
Raspberry-Pi Interface Function
Embedded Pi Pin remap
1
3.3V Power
3.3V Power
2
5V Power
5V Power
3
GPIO0/SDA
D14
4
5V Power
NC
5
GPIO1/SCL
D15
6
GND
GND
7
GPIO4/GPCLK0
D9
8
GPIO14/TXD
D1
9
GND
NC

15
10
GPIO15/RXD
D0
11
GPIO17
D2
12
GPIO18/PCM_CLK
D3
13
GPIO21/PCM_DOUT
D4
14
GND
NC
15
GPIO22
D5
16
GPIO23
D6
17
3.3V Power
NC
18
GPIO24
D7
19
GPIO10/MOSI
D11
20
GND
NC
21
GPIO9/MISO
D12
22
GPIO25
D8
23
GPIO11/SCKL
D13
24
GPIO8/CE0
D10
25
GND
NC
26
GPIO7/CE1
NC
3.8 Program the Embedded Pi
3.8.1 ISP mode
In ISP mode, a PC programs the MCU onboard via the serial port (JP7-TX1 and JP7-RX1), refer to
section 3.6.1. To use this mode, you need to set BOOT0 to 1 (high level), and BOOT1 to 0 (low
level) –which has been done on hardware. In this case, you only need to press the BOOT0 button
to enter this mode when Embedded Pi is powered on.
The next steps are as below:
1) Install the ISP tool for Embedded Pi on your PC or Raspberry Pi. There are many ISP tools for
PC, and ST has provided a version for Windows system only. For details, please refer to
http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/USER_
MANUAL/CD00171488.pdf. Raspberry Pi uses the Linux system, where no ISP tools are
available yet, and need to be developed.
2) Disconnect Embedded Pi from power.

16
3) Connect the ISP interface on Embedded Pi with your PC (or Raspberry Pi) according to the
instruction of the ISP tool. Figure 3-5 shows the pins of the ISP interface on Embedded Pi.
When using a PC to program Embedded Pi, an RS232 voltage conversion chip is needed
between to convert the TTL voltage level of Embedded Pi to the RS232 voltage level of PC.
4) Configure JP1 to select the bus voltage between 3.3V and 5V according to the ArduinoTM
shields in use. For configuration information of JP1, refer to 3.12 Jumper.
5) Power on Embedded Pi, the power indicator LED will be lighted. Press BOOT0 and hold it
there, and press RESET button for 1 second, then release BOOT0, the Embedded Pi will enter
the ISP mode.
6) Launch the ISP tool to program Embedded Pi.
3.8.2 External Debugger Mode
Since Embedded Pi has no debugger onboard, an external JTAG/SWD debugger is needed to
program Embedded Pi in the External Debugger Mode, like J-Link and CoLinkEx.
The configuration steps are as below:
1) Disconnect Embedded Pi from power.
2) Install the debugger driver on PC. You can ship this step if you have installed one. To install
the driver of CoLinkEx, refer to http://www.coocox.org/Colinkex.htm.
3) Install the integrated development environment on PC. You can ship this step if you have
installed one. To install CoIDE, refer to http://www.coocox.org/CooCox_CoIDE.htm.
4) Connect Embedded Pi to the PC via the 10-Pin JTAG/SWD interface (JP2).
Figure 3-6 Pin-outs of the 10-Pin JTAG/SWD interface
5) Power on Embedded Pi, the power indicator LED will be lighted.
6) Start download and debug your program.
Note: SWD debuggers are supported by default. To use a JTAG debugger, you need to connect

17
SJ1 with JTDI first with electronic iron and solders.
1
3
STM32-PA15
D8
JP2-TDI
2
SJ1
3.9 Button
Table 3-8 Function of buttons on Embedded Pi
Button ID
Name
Function
Remark
1
RESET
Reset the Embedded Pi or
the ArduinoTM shields in use
2
BOOT0
Select Boot Mode
Reference:
1) STM32 Flash Programming
Manual (PM0042)
2) Chapter 3.8.1
3.10 LED
Table 3-9 Function of LEDs on Embedded Pi
LED ID
Function
Note
1
User LED
1) LED Pin –PB13
2) LED Control method
PB13 Pin high LED ON (Green)
PB13 Pin low LED OFF
2
Indicate Power Status
Power ON LED ON (Green)
Power OFF LED OFF

18
3.11 System Clock Source
Table 3-10 System Clock Source Function of Embedded Pi
Clock Source ID
Crystal Frequency
Function
1
8MHz
System main clock source
2
32.768KHz
RTC input clock source
3.12 Jumper
Table 3-11 Function of Embedded Pi Jumpers
Jumper ID
Function
Description
JP1
Bus Power Selection
1
Output 3V3
1
Output 5V
JP3
Raspberry Pi Bus
Enablement
To configure operation mode.
JP4
STM32 Bus Enablement
To configure operation mode.
Table 3-12 Operation mode configuration
Operation Mode
Jumpers Configuration
STM32/Standalone Mode
ST-Adapter Mode
Raspberry Pi Mode

19
4Operation Modes
The Embedded Pi has three operation modes, selectable by jumpers. Refer to 3.12 Jumper.
4.1 STM32/Standalone Mode
The Embedded Pi works as an ArduinoTM form-factor compatible mother board where the STM32
controls the ArduinoTM shields directly without the use of Raspberry Pi. It can sense the
environment by receiving input from a variety of sensors and can affect its surroundings by
controlling lights, motors, and other actuators.
STM32
CoX STM32 Library (HAL)
Hardware Layer
Application Layer
Arduino form-factor
compatible interfaces
EPI extended interfaces
Arduino Shields
LCD Motor Sensor
Key Network ...
1 SPI, 1 I2C,1
UART with flow
control, 2 pairs
of PWM (+-), 6
analog inputs,1
CAN
1 SPI, 1 I2C, 4
PWM, 1 UART,
6 analog inputs
CooCox Shields
LCD Motor Sensor
Key Network ...
Shield Driver Layer
LCD
Driver
Motor
Driver
Sensor
Driver
Key
Driver
WiFi, ETH
Driver ...
Figure 4-1 Block diagram of STM32 Mode
4.1.1 Hardware connections
The Embedded Pi is compatible with both 5V and 3.3V ArduinoTM shields, selectable with jumpers.
Table of contents