GHI Electronics, LLC
501 E. Whitcomb Ave.
Madison Heights, Michigan 48071
Phone: (248) 397-8856
Fax: (248) 397-8890
www.ghielectronics.com
G30 SoC Datasheet
Where Hardware Meets Software
GHI Electronics, LLC
1
Introduction
G30 SoC Datasheet
Contents
2
Introduction ..........................................................................................................................................................3
2.1
Key Features .................................................................................................................................................3
2.2
Example Applications ...................................................................................................................................3
3
The .NET Micro Framework ..................................................................................................................................4
3.1
GHI Electronics and NETMF..........................................................................................................................4
4
Pinout Table ..........................................................................................................................................................5
5
Reference Design ..................................................................................................................................................6
6
Device Startup .......................................................................................................................................................7
7
Libraries ................................................................................................................................................................8
7.1
General Purpose Input and Output (GPIO) ..................................................................................................8
7.2
Analog Input .................................................................................................................................................8
7.3
Pulse Width Modulation (PWM) ..................................................................................................................8
7.4
Signal Generator ..........................................................................................................................................8
7.5
Signal Capture ..............................................................................................................................................9
7.6
Pulse Feedback .............................................................................................................................................9
7.7
Universal Asynchronous Receiver Transmitter (UART) ................................................................................9
7.8
Serial Peripheral Interface (SPI) ...................................................................................................................9
7.9
Inter-Integrated Circuit (I2C) ........................................................................................................................9
7.10
1-Wire ..........................................................................................................................................................9
7.11
Graphics .......................................................................................................................................................9
7.12
USB Client .....................................................................................................................................................9
7.13
File System .................................................................................................................................................10
7.14
Networking .................................................................................................................................................10
7.14.1
Ethernet .............................................................................................................................................10
7.14.2
Wi-Fi ..................................................................................................................................................10
7.15
Configuration .............................................................................................................................................10
7.16
Real Time Clock ..........................................................................................................................................10
7.17
Watchdog ...................................................................................................................................................10
7.18
Power Control ............................................................................................................................................10
7.19
Direct Memory Access ...............................................................................................................................10
7.20
Battery RAM ...............................................................................................................................................11
8
Design Considerations ........................................................................................................................................12
8.1
Required Pins .............................................................................................................................................12
8.2
Power Supply .............................................................................................................................................12
8.3
Crystals .......................................................................................................................................................12
8.4
Interrupt Pins .............................................................................................................................................12
8.5
Reset ..........................................................................................................................................................12
8.6
Direct Memory Access ...............................................................................................................................12
9
Legal Notice ........................................................................................................................................................13
9.1
Licensing .....................................................................................................................................................13
9.2
Trademarks ................................................................................................................................................13
9.3
Disclaimer ...................................................................................................................................................13
10 Revision History ..................................................................................................................................................14
Rev 1.0
2
www.ghielectronics.com
GHI Electronics, LLC
2
Introduction
G30 SoC Datasheet
Introduction
The G30 SoC is a powerful, low-cost, surface-mount LQFP64 System on Chip (SoC) running Microsoft's .NET Micro
Framework. The .NET Micro Framework enables the SoC to be programmed from Microsoft Visual Studio using a
USB or serial cable. Programming in a modern managed language, such as C# or Visual Basic, allows developers to
accomplish more work in less time by taking advantage of the extensive built-in libraries for networking, file
systems, graphical interfaces, and more.
A simple two-layer circuit board with a power source and a few connectors can utilize the G30 SoC to bring the
latest technologies to any product. There are no additional licensing or other fees and all the development tools
are provided freely.
Throughout this document, the G30 SoC will be referred to as the G30.
For more information and support, please see https://www.ghielectronics.com/support/netmf and the product
catalog entry. For advanced electrical characteristics and details on the underlying STM32F401RET6 processor,
please consult the processor’s datasheet.
2.1
Key Features
2.2
.NET Micro Framework
RoHS Lead Free
84 MHz ARM Cortex-M4 STM32F401RET6
68 Kbytes available RAM
128 Kbytes available flash
49 GPIO
16 interrupt capable GPIO
2 SPI
1 I2C
2 UART
15 PWM
16 12-bit analog input
4-bit SD/MMC memory card interface
Low power modes
-40°C to +85°C operational
LQFP64 10 x 10 mm
RTC
Watchdog
Threading
USB client
File System
o Full .NET file interface
o SD cards
Native extensions
o Device register access
Signal controls
o Generation
o Capture
o Pulse measurement
Example Applications
Vending machines
POS Terminals
Measurement tools and testers
Networked sensors
Robotics
Central alarm system
Smart appliances
Industrial automation devices
Rev 1.0
3
www.ghielectronics.com
GHI Electronics, LLC
3
The .NET Micro Framework
G30 SoC Datasheet
The .NET Micro Framework
Inspired by the full .NET Framework, Microsoft developed a lightweight version called .NET Micro Framework
(NETMF). NETMF focuses on the specific requirements of resource-constrained embedded systems. Development,
debugging, and deployment are all conveniently performed using Microsoft's powerful Visual Studio through a
standard USB or serial cable.
Programming is done in C# or Visual Basic with libraries that cover sockets, memory management with garbage
collection, advanced file system support, multitasking services, and many others. In addition to supporting many
standard .NET features, NETMF has additional embedded extensions supporting microcontroller specific needs
such as PWM outputs and analog inputs.
3.1
GHI Electronics and NETMF
Since signing the partnership agreement with Microsoft in 2008, GHI Electronics has become the leading Microsoft
partner on NETMF through its work on integrating and extending the NETMF core. GHI Electronics's NETMF
products are extended with important features extending the NETMF libraries such as databases, USB Host, Wi-Fi,
and native programming.
Rev 1.0
4
www.ghielectronics.com
GHI Electronics, LLC
4
Pinout Table
G30 SoC Datasheet
Pinout Table
Many signals on the G30 are multiplexed to offer multiple functions on a single pin. Developers can decide on the
pin functionality to be used through the provided libraries. Any pin with no name, function, or note must be left
unconnected.
1
25
35
45
5
6
7
8
9
10
11
126
136
14
15
16
17
18
19
20
21
22
PC13
PC14
PC15
PC0
PC1
PC2
PC3
PA0
PA1
PA2
PA3
PA4
PA5
PA6
ADC0
ADC1
ADC2
ADC3
VBAT
LDR1
RTC XTAL IN
RTC XTAL OUT
SYS XTAL IN
SYS XTAL OUT
RESET
ADC10
ADC11
ADC12
ADC13
GND
3.3 V
COM2 CTS
COM2 RTS
COM2 TX
COM2 RX
GND
3.3 V
ADC4
ADC5
ADC6
PWM3
PWM4
PWM5
PWM6
23
24
25
26
27
281
29
302
31
32
33
34
35
36
37
38
39
40
41
42
433
44
PA7
PC4
PC5
PB0
PB1
PB2
PB10
ADC7
ADC14
ADC15
ADC8
ADC9
MODE
GND
3.3 V
PB12
PB13
PB14
PB15
PC6
PC7
PC8
PC9
PA8
PA9
PA10
PA11
SPI2 SCK
SPI2 MISO
SPI2 MOSI
PWM7
PWM8
PWM9
SD D0
PWM10
SD D1
PWM0
COM1 TX
PWM1
COM1 RX
PWM2
USBC D-
45
46
47
48
49
50
51
523
53
54
55
56
573
584
594
601
61
62
63
64
PA12
PA13
USBC D+
GND
3.3 V
PA14
PA15
PC10
PC11
PC12
PD2
PB3
PB4
PB5
PB6
PB7
LDR0
SD D2
SD D3
SD CLK
SD CMD
SPI1 SCK
SPI1 MISO
SPI1 MOSI
I2C SCL
PWM11
I2C SDA
PWM12
PB8
PB9
1
Requires a 10 kΩ pull-down resistor
Requires a 4.7 μF capacitor to GND
3
Requires a 10 kΩ pull-up resistor
4
Open drain requiring a 2.2 kΩ pull-up resistor
5
Can sink 3 mA, cannot source
6
Used for the analog system
2
Rev 1.0
5
www.ghielectronics.com
PWM13
PWM14
GND
3.3 V
GHI Electronics, LLC
5
Reference Design
G30 SoC Datasheet
Reference Design
The G30 Dev Board is an excellent starting point and reference design for anyone interested in evaluating and
developing with the G30. See the product catalog entry for more information and additional resources.
Rev 1.0
6
www.ghielectronics.com
GHI Electronics, LLC
6
Device Startup
G30 SoC Datasheet
Device Startup
The G30 is held in reset when the reset pin is low. Releasing it will begin the system startup process.
There are three different components of the device firmware:
1.
2.
3.
GHI Bootloader: initializes the system, updates TinyCLR when needed, and executes TinyCLR.
TinyCLR: loads, debugs, and executes the managed application.
Managed application: the program developed by the customer.
Which components get executed on startup can be control by manipulating the LDR0 pin. It is pulled high on
startup. When low, the device waits in the GHI Bootloader. Otherwise, the managed application is executed. LDR1
is reserved for future use.
Additionally, the communications interface between the host PC and the G30 is selected on startup through the
MODE pin, which is pulled high on startup. The USB interface is selected when MODE is high and COM1 is selected
when MODE is low.
The above discussed functions of LDR0, LDR1, and MODE are only during startup. After startup, they return to the
default GPIO state and are available to use as GPIO in the user application.
Rev 1.0
7
www.ghielectronics.com
GHI Electronics, LLC
7
Libraries
G30 SoC Datasheet
Libraries
Similar to the full .NET Framework, NETMF includes many built in libraries to help in modern application
development with additional libraries to support embedded systems.
Please see https://www.ghielectronics.com/support/netmf for more information.
7.1
General Purpose Input and Output (GPIO)
GPIOs can read and write logical high and low signals. Keep the following in mind:
7.2
They default to inputs with internal weak pull-up resistors
They operate on 3.3 V logic levels.
They are 5 V tolerant when not in analog or crystal mode.
They have controllable pull up and pull down resistors.
Not all are interrupt capable at the same time. See design considerations.
Most pins can source or sink up to 8 mA (see the processor’s documentation for advanced information).
Analog Input
Analog inputs can read voltages from 0 V to 3.3 V with 12-bit resolution. The built in analog circuitry uses the
source voltage as a reference which can cause some noise on the analog signal. High accuracy ADCs with a
dedicated reference can be added externally.
7.3
Pulse Width Modu lation (PWM)
PWM is used to create a waveform with a specified frequency and duty cycle. It uses built-in hardware so no
processing resources are needed to keep it running. Frequencies can range from 1 Hz to 42 MHz.
Some PWM channels share the same source clock internally. Changing the frequency on a channel will affect other
channels; however, they can have a separate duty cycle.
7.4
Channel
Timer
0 to 2
1
3 to 6
2
7 to 10
3
11 to 14
4
Signal Generator
Signal Generator is used to generate a waveform on any GPIO with varying frequency and duty cycle. The feature is
software driven and can generate frequencies up to 200 kHz ±10%. More processing time is required for higher
frequencies.
Rev 1.0
8
www.ghielectronics.com
GHI Electronics, LLC
7.5
Libraries
G30 SoC Datasheet
Signal Capture
Signal Capture monitors any GPIO and records the time from the last change. This feature is software driven and
can measure frequencies up to 250 kHz ±10%. Lower frequencies have higher accuracy.
7.6
Pulse Feedback
Pulse Feedback is used for sensing capacitance on any input pin and measuring pulses from ultrasonic distance and
other sensors. When used for sensing capacitance, a 100 pF capacitor and 1 MΩ resistor between the pad and
ground are recommended.
7.7
Universal Asynchronous Receiver Transmitter (UART)
UART is a common, full duplex, communications interface. Baud rates from 2,400 to 921,600 are supported.
Handshaking is supported on COM2 only. Data bits of 8 and 9 are supported. Stop bits of 1 and 2 are supported.
Even and odd parities are supported.
7.8
Serial Peripheral Interface (SPI)
SPI is a common three or four wire serial interface. The G30 can act as a SPI bus master only. The maximum
supported clock is 42 MHz and all four SPI modes are supported. The SPI bus is designed to interface with multiple
SPI slave devices. The active slave is selected by asserting the chip select line on the slave device.
7.9
Inter-Integrated Circuit (I2C)
I2C is a two-wire addressable serial interface. The G30 can act as an I2C bus master only with 7-bit slave addresses.
It can connect to one or more slave devices over the same connection with a maximum clock of 400 kHz. The I2C
bus interface requires pull up resistors to be added on both the SCL and SDA pins, usually 2.2 kΩ.
It is possible to simulate an independent I2C bus on any two GPIO pins with the appropriate resistors though the
software I2C class, but performance will be lower.
7.10 1-Wire
Through 1-Wire, a master can communicate with multiple 1-Wire slaves using any GPIO.
7.11 Graphics
The G30 does not include any graphics libraries. However, the user application can render graphics on SPI displays
manually or use character displays.
7.12 USB Client
The USB client interface is typically used as the G30 debug interface and for application deployment through Visual
Studio. However, it is controllable and may be used to simulate other USB devices such as mice, keyboards, and
Communications Device Class (CDC) interfaces using low level access instead of the debug interface.
Rev 1.0
9
www.ghielectronics.com
GHI Electronics, LLC
Libraries
G30 SoC Datasheet
7.13 File System
The G30 supports accessing files on SD cards formatted as FAT16 or FAT32. It uses a true 4-bit interface and
MMC/SD/SDHC/SDXC cards in full, mini, and micro formats are supported. Access speeds are dependent on many
different factors and can be up to 500 Kbyte/s.
7.14 Networking
7.14.1 Ethernet
There is no internal support for Ethernet. However, any Ethernet module with a built-in TCP/IP stack can be used.
7.14.2 Wi-Fi
There is no internal support for Wi-Fi. However, any Wi-Fi module with a built-in TCP/IP stack can be used.
7.15 Configuration
Access to the configuration sector of the device is provided for storage of small, infrequently changing, entries. The
data will be lost if the configuration is reflashed. Space is limited and varies based on other information stored in
the configuration.
7.16 Real Time Clock
The real time clock (RTC) is used to keep time while the processor is off, drawing its power from a backup battery
or super capacitor providing 1.65 V to 3.6 V. An appropriate 32,768 Hz crystal and its associated circuitry must be
connected to the G30 for the RTC to function.
7.17 Watchdog
Watchdog is used to reset the system if it enters an erroneous state. The G30 supports timeouts between 1 ms and
32,768 ms. Watchdog support is included through the GHI Electronics libraries replacing the built in NETMF
version.
7.18
Power Control
The G30 supports entering sleep, deep sleep, and off modes in order to reduce power usage. It can consume as
little as 17 mA in sleep, 5 mA in deep sleep, and 4 mA in off. It may be woken from an RTC alarm or a GPIO
interrupt. Sleep pauses execution of the program. Deep sleep pauses execution of the program and shuts down
many internal functions. Off shuts down all internal functions and can only be woken by the RTC alarm or a system
reset. The system will be automatically reset when exiting off mode.
7.19 Direct Memory Access
Low level device registers and memory can be accessed to further configure the G30’s underlying processor. Not
all functionality of the processor is available as some functions may be used or configured internally for use in
NETMF.
Rev 1.0
10
www.ghielectronics.com
GHI Electronics, LLC
Libraries
G30 SoC Datasheet
7.20 Battery RAM
Battery-backed RAM is provided as part of the internal RTC. This memory retains its contents when the power is
lost as long as there is a backup battery. There are 80 bytes of battery backed RAM available. Consult the
processor's documentation for details on use.
Rev 1.0
11
www.ghielectronics.com
GHI Electronics, LLC
8
Design Considerations
G30 SoC Datasheet
Design Considerations
8.1
Required Pins
Exposing the following pins is required in every design to enable device programming, updates, and recovery:
8.2
LDR0
LDR1
Desired debug interface(s)
MODE if required to select a debug interface
Power Supply
A typical clean power source, suited for digital circuitry, is needed to power the G30. Voltages should be within at
least 10% of the needed voltage. Decoupling capacitors of 0.1 μF are needed near every power pin. Additionally, a
large capacitor, typically 47 μF, should be near the G30 if the power supply is more than few inches away.
8.3
Crystals
The G30 requires an external 12 MHz crystal and associated circuitry to function. For the RTC to function, a 32,768
Hz crystal and circuitry are required. Please see the processor’s documentation for advanced information.
8.4
Interrupt Pins
Interrupts are only available on 16 pins at any given time. Of those 16 pins, the pin number must be unique. For
example: PA1 and PB1 cannot both be used as interrupts at the same time, but PA1 and PB2 can.
8.5
Reset
The reset pin is not pulled in any direction. Designs must be sure to use an appropriate pull-up resistor.
8.6
Direct Memory Access
Most of the core processor’s resources are used by NETMF. Some resources are permanently used, like the main
system timer while others are used when specific features, like the timers for PWM, are enabled. Used resources
can change from one firmware version to another so care must be taken when using these resources through RLP
or other direct memory access methods.
When absolutely required, applications can use resources in conjunction with NETMF. For example, creating a
special baud rate, utilizing the timer capture feature, and making use of many other features supported by the
processor. Please contact GHI Electronics’s consulting services to determine exactly what resources are available
and if the G30 can fulfill the specific requirements.
Rev 1.0
12
www.ghielectronics.com
GHI Electronics, LLC
9
9.1
Legal Notice
G30 SoC Datasheet
Legal Notice
Licensing
The G30 SoC, with all its built-in software components, is licensed for commercial and non-commercial use. No
additional fee or licensing is required. Software, firmware, and libraries provided for the G30 SoC are licensed to be
used on the G30 SoC only.
9.2
Trademarks
G30 is a trademark of GHI Electronics, LLC.
.NET Micro Framework and Visual Studio are registered or unregistered trademarks of Microsoft Corporation.
Other registered or unregistered trademarks are owned by their respective companies.
9.3
Disclaimer
IN NO EVENT SHALL GHI ELECTRONICS, LLC BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS PRODUCT, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE. GHI ELECTRONICS, LLC LINE OF PRODUCTS ARE NOT DESIGNED FOR LIFE SUPPORT APPLICATIONS.
SPECIFICATIONS AND AVAILABILITY ARE SUBJECT TO CHANGE WITHOUT ANY NOTICE.
Rev 1.0
13
www.ghielectronics.com
GHI Electronics, LLC
Revision History
G30 SoC Datasheet
10 Revision History
Revision
Date
Change
1.0
2015-11-12
Initial release.
Rev 1.0
14
www.ghielectronics.com