ZigBee® dual IF EEPROM adapter for the STM322xG-EVAL
Introduction
This user manual describes the ZigBee® adapter for the STM322xG-EVAL needed to
manage a smartplugW network system through the STM322xG-EVAL board. The ZigBee
adapter for the STM322xG-EVAL has been developed in order to interface the STM322xGEVAL board with the ZigBee coordinator. The ZigBee coordinator is connected to the
STM322xG demonstration board through the adapter that allows SPI, I²C and UART
communication. The user can properly set jumpers JP3 and JP4 in order to choose how to
communicate between the STM32W and STM32F2xx. The I²C interface is used for the
communication of the STM32W and the dual interface EEPROM onboard. In Figure 1, it is
possible to take a quick look at the STM322xG-Eval board and a smartplug node block
diagram. The dual interface EEPROM “M24LR64r” onboard is accessible from both the
STM32W and the STM32F2xx via I²C interface and remotely by means of an RF reader.
Therefore, it is possible to read and update parameters from inside (I²C) and outside (RF)
the application. It therefore allows final application data management:
■ IDentification: read-only unique identifier
■ Traceability: trace code, date, BOM code, etc.
■ Inventory: supply chain visibility
■ Live update: application parameter update
■ Remote activation: code enabler
■ Maintenance: wireless access to events/logs
■ Diagnostics: possible real-time wireless access to parameters
Figure 1.STM322xG-EVAL board and a smartplug node block diagram
The STM3220G-EVAL demonstration board is a complete demonstration and development
platform for the STM32 F-2 series and includes an embedded STM32F207IGH6 highperformance ARM
The full range of hardware features on the board is provided to help the user evaluate all
peripherals (USB OTG HS, USB OTG FS, Ethernet, motor control, CAN, MicroSD card,
smartcard, USART, audio DAC, RS-232, IrDA, SRAM, MEMS, EEPROM… etc.) and
develop their own applications. Extension headers make it possible to easily connect a
daughterboard or wrapping board for specific applications.
The in-circuit ST-LINK tool can be easily used for JTAG and SWD interface debugging and
programming.
®
Cortex-M3 32-bit microcontroller with a cryptographic acceleration cell.
Doc ID 022813 Rev 25/40
STM3220G-EVAL demonstration boardUM1519
1.1 Features
●STM32F207IGH6 microcontroller
●16 Mbit SRAM
●1 Gbyte or more MicroSD card
●Boot from user Flash, system memory or SRAM
●Both ISO/IEC 14443 type A and B smartcards supported
2
●I
C compatible serial interface 8-Kbyte EEPROM, MEMS and I/O expander
●IEEE 802.3-2002 compliant Ethernet connector
●Two CAN 2.0 A/B channels on the same DB connector
●RS-232 communication
●IrDA transceiver
●USB OTG (HS and FS) with Micro-AB connector
●Inductor motor control connector
●I2S audio DAC, stereo audio jack for headset
●3.2" 240x320 TFT color LCD with touchscreen
●4 color LEDs
●Camera module and extension connector for ST camera plug-in
●Joystick with 4-direction control and selector
●Reset, wake-up, tamper and user button
●RTC with backup battery
●Extension connector for daughterboard or wrapping board
●JTAG, SW and trace debug support
●Embedded ST-LINK/V2
●Five 5 V power supply options: power jack, USB FS connector, USB HS connector,
ST-LINK/V2 or daughterboard
●MCU consumption measurement circuit.
1.2 Hardware layout and configuration
The STM3220G-EVAL demonstration board is designed around the STM32F207IGH6
microcontroller with a cryptographic acceleration cell in the UFBGA176 package. The
hardware block diagram, Figure 2, illustrates the connection between the STM32F207IGH6
and peripherals (camera module, LCD, SRAM, EEPROM, MEMS, USART, IrDA, USB OTG
HS, USB OTG FS, Ethernet, audio, CAN bus, smartcard, MicroSD card and motor control)
and Figure 3 helps the user locate these features on the actual demonstration board.
The STM322xG-EVAL demonstration board is designed to be powered by 5 V DC power
supply and to be protected by PolyZen from a wrong power plug-in event. It is possible to
configure the demonstration board to use any of the following five sources for the power
supply:
●5 V DC power adapter connected to JP18, the power jack on the board
●5 V DC power with 500 mA limitation from CN8, the USB OTG FS Micro-AB connector
●5 V DC power with 500 mA limitation from CN9, the USB OTG HS Micro-AB connector
●5 V DC power with 500 mA limitation from CN21, the ST-LINK/V2 USB connector
●5 V DC power from both CN1 and CN3, the extension connector for the daughterboard
(DTB for daughterboard on silkscreen).
The power supply is configured by setting the related jumpers JP4, JP32, JP18 and JP19,
as described in Ta bl e 1 .
Doc ID 022813 Rev 29/40
STM3220G-EVAL demonstration boardUM1519
Table 1.Power related jumpers and solder bridges
Jumper Description
JP4
JP32
Jumper reserved for future use (RFU). It should be left open.
Default setting: not fitted
MCU_VDD is connected to 3.3 V power when JP32 is closed and MCU current
consumption measurement can be done manually by multi-meter when JP32 is
open.
Default setting: fitted
JP18 is used to select one of the four possible power supply resources.
To select the ST-LINK/V2 USB connector (CN21) power supply, set JP18 as shown:
(default setting)
For power supply jack (CN18) to the STM322xG-EVAL, JP18 is set as shown to the
right: (default setting)
To select daughterboard connector (CN1 and CN3) power
supply, set JP18 as shown:
JP18
To select USB OTG FS (CN8) power supply, set JP18 as shown:
To select USB OTG HS (CN9) power supply, set JP18 as shown:
To select power supply jack (CN18) power supply to both STM322xG-EVAL
and daughterboard connected on CN1 and CN3, set JP18 as shown
(daughterboard must not have its own power supply connected)
10/40Doc ID 022813 Rev 2
UM1519STM3220G-EVAL demonstration board
Table 1.Power related jumpers and solder bridges (continued)
Jumper Description
To connect Vbat to the battery, set JP19 as shown:
JP19
To connect Vbat to 3.3 V power, set JP19 as shown:
(default setting)
Note:The LED LD9 is lit when the STM322xG-EVAL demonstration board is correctly powered by
the 5 V.
1.4 Boot option
The STM322xG-EVAL demonstration board is able to boot from:
●Embedded user flash
●System memory with boot loader for ISP
●Embedded SRAM for debugging.
The boot option is configured by setting switch SW1 (BOOT1) and SW2 (BOOT0). The
BOOT0 can be configured also via RS232 connector CN16.
Table 2.Boot related switch
BOOTBOOT1Boot source
0Don’t careSTM322xG-EVAL boots from user Flash (default setting)
11STM322xG-EVAL boots from embedded SRAM
10STM322xG-EVAL boots from system memory
1.5 Clock source
Four clock sources are available on the STM322xG-EVAL demonstration board for the
STM32F207IFT6 and RTC embedded.
●X1, 25 MHz crystal for Ethernet PHY with socket. It can be removed when clock is
provided by the MCO pin of the MCU
●X2, 26 MHz crystal for USB OTG HS PHY
●X3, 32 kHz crystal for embedded RTC
●X4, 25 MHz crystal with socket for the STM32F207IGH6 microcontroller (it can be
removed from socket when internal RC clock is used).
Doc ID 022813 Rev 211/40
STM3220G-EVAL demonstration boardUM1519
1.6 Reset source
The reset signal of the STM322xG-EVAL demonstration board is low active and the reset
sources include:
●Reset button B1
●Debugging tools from JTAG connector CN14 and trace connector CN13
●Daughterboard from CN3
●RS232 connector CN16 for ISP
●ST-LINK/V2.
1.7 EEPROM
A 64 Kbit EEPROM is connected to the I2C1 bus of the STM32F207IGH6.
Table 3.EEPROM related jumper and solder bridge
JumperDescription
1.8 Ethernet
The STM322xG-EVAL demonstration board supports 10M/100M Ethernet communication
by a PHY DP83848CVV (U5) and integrated RJ45 connector (CN7). Both MII and RMII
interfaces can be selected by setting jumpers JP5, JP6 and JP8 as listed below:
Table 4.Ethernet related jumpers and solder bridges
JumperDescription
JP8
JP6
JP24
JP8 is used to select MII or RMII interface mode.
To enable MII, JP8 is not fitted.
To enable RMII interface mode, JP8 is fitted.
Default setting: not fitted
To enable MII interface mode, set JP6 as shown (default setting):
To enable RMII interface mode, set JP6 as shown:
The EEPROM is in write protection mode when JP24 is fitted.
Default setting: not fitted
12/40Doc ID 022813 Rev 2
UM1519STM3220G-EVAL demonstration board
Table 4.Ethernet related jumpers and solder bridges (continued)
JumperDescription
To provide 25 MHz clock for MII or 50 MHz clock for RMII by
MCO at PA8, set JP5 as shown (default setting):
JP5
SB1
To provide 25 MHz clock by external crystal X1 (for MII interface
mode only) set JP5 as shown:
When clock is provided by external oscillator U3, JP5 must not be fitted
(default setting).
SB1 is used to select clock source only for RMII mode.
To connect the clock from MCO to RMII_REF_CLK, close SB1.
The resistor R212 must be removed in this case.
Default setting: open
Note:A test point (TP2) is available on the board for the PTP_PPS feature test.
The Ethernet PHYU5 can be powered down by regulating PB14.
1.9 SRAM
The 16 Mbit SRAM is connected to the FSMC bus of the STM32F207IGH6 which shares the
same I/Os with CAN1 bus. JP3 and JP10 must not be fitted for SRAM and LCD application.
Table 5.SRAM related jumpers
JumperDescription
JP1
JP2
Connect PE4 to SRAM as A20 by setting JP1 as shown (default
setting):
Connect PE4 to trace connector CN13 as TRACE_D1 by setting
JP1 as shown:
Connect PE3 to SRAM as A19 by setting JP2 as shown (default
setting):
Connect PE3 to trace connector CN13 as TRACE_D0 by setting
JP2 as shown:
Doc ID 022813 Rev 213/40
STM3220G-EVAL demonstration boardUM1519
1.10 Development and debug support
The version 2 of the ST-LINK, called ST-LINK/V2, is embedded on the board. This tool
allows onboard program loading and debugging of the STM32F using the JTAG or SWD
interface.
Third-party debug tools are also supported by the JTAG (CN14) or trace (CN13) connectors.
To communicate with the embedded ST-LINK/V2, a specific driver needs to be installed on
the PC. To download and install this driver, refer to the software and development tools page
for the STM32F family available on www.st.com (the install shield is called STLINK_V2_USBdriver.exe).
The embedded ST-LINK/V2 connects to the PC via a standard USB cable from connector
CN21. The bicolor LED LD10 (COM) indicates the status of the communication as follows:
●Slow blinking red/off: at power-on before USB initialization
●Fast blinking red/off: after the first correct communication between PC and ST-LINK/V2
(enumeration)
●Red LED on: when initialization between PC and ST-LINK/V2 is successfully finished
●Green LED on: after successful target communication initialization
●Blinking red/green: during communication with target
●Green on: communication finished and OK
●Orangeon: communication failure.
Note:It is possible to power the board via CN21 (embedded ST-LINK/V2 USB connector) even if
an external tool is connected to CN13 (trace) or CN14 (external JTAG and SWD).
1.11 Display and input devices
The 3.2" TFT color LCD connected to the FSMC bus and 4 general purpose color LEDs
(LED 1, 2, 3, 4) are available as display devices. A touchscreen connected to an I/O
expander (U24), 4-direction joystick with selection key, general purpose button (B4), wakeup
button (B2) and tamper detection button (B3) are available as input devices.
Table 6.LCD modules
3.2” TFT LCD with touchscreen (CN16)
Pin on CN16Pin namePin connection
1CSFSMC_NE3 (PG10)
2RSFSMC_A0
3WR/SCLFSMC_NWE
4RDFSMC_NOE
5RESETRESET#
6PD1FSMC_D0
7PD2FSMC_D1
8PD3FSMC_D2
9PD4FSMC_D3
14/40Doc ID 022813 Rev 2
UM1519STM3220G-EVAL demonstration board
Table 6.LCD modules (continued)
3.2” TFT LCD with touchscreen (CN16)
Pin on CN16Pin namePin connection
10PD5FSMC_D4
11PD6FSMC_D5
12PD7FSMC_D6
13PD8FSMC_D7
14PD10FSMC_D8
15PD11FSMC_D9
16PD12FSMC_D10
17PD13FSMC_D11
1.12 Daughterboard extension connector CN1, 2, 3 and CN4
Four male headers CN1, 2, 3 and CN4 can be used to connect the daughterboard or
standard wrapping board to the STM322xG-EVAL demonstration board. A total number of
140 GPIOs are available on the board.
Each pin on CN1, 2, 3 and 4 can be used by a daughterboard after disconnecting it from the
corresponding function block on the STM322xG-EVAL demonstration board.
The adapter is connected to the extended connectors CN2 and CN4 on the STM322xGEVAL (for more detailed information, please refer to Ta bl e 8 to Ta bl e 1 0 ), it allows the
connection of a ZigBee smartplug coordinator and the I2C/RF dual interface EEPROM
M24LR64-r.
Table 7.Daughterboard extension connector CN1
PinDescriptionAlternative function
1GND--
3PE3Trace_D0 and FSMC_A19Keep JP2 on 2<->3
5PE5Trace_D2
7PI8LCD_HSYNC-
9PC14OSC32_INRemove R84, SB4 closed
11PC15OSC32_OUTRemove R85, SB5 closed
13PI10MII_RX_ERRemove RS3
15PF0FSMC_A0-
17PF2FSMC_A2-
19GND--
How to disconnect with function
block on STM322xG-EVAL board
How to disconnect with function
block on STM322xG-EVAL board
1TxData+2TxData-
3RxData+4Shield
5Shield6RxData-
7Shield8Shield
1.14 JTAG debugging connector CN14
Figure 7.JTAG debugging connector CN14
22/40Doc ID 022813 Rev 2
UM1519STM3220G-EVAL demonstration board
!-V
Table 12.JTAG debugging connector CN14
Pin numberDescriptionPin numberDescription
13.3 V power23.3 V power
3PB44GND
5PA156GND
7PA138GND
9PA1410GND
11RTCK12GND
13PB314GND
15RESET#16GND
17DBGRQ18GND
19DBGACK20GND
1.15 Power connector CN18
The STM322xG-EVAL demonstration board can be powered from a DC 5 V power supply
via the external power supply jack (CN18) shown inFigure 7. The central pin of CN18 must
be positive.
Figure 8.Power supply connector CN18
1.16 TFT LCD connector CN19
One 34-pin male header CN19 is available on the board for connecting the LCD module
board MB785. Please refer to Section 1.11 for details.
Doc ID 022813 Rev 223/40
ZigBee module SPZB32W1x2.1UM1519
2 ZigBee module SPZB32W1x2.1
The SPZB32W is a low power consumption ZigBee module optimized for embedded
applications. It enables OEMs to easily add wireless capability to electronic devices. The
module is based on the SN260 ZigBee network processor which integrates a 2.4 GHz, IEEE
802.15.4-compliant transceiver as well as IEEE 802.15.4 PHY and MAC. The module is
controlled by means of a standard serial interface (SPI) allowing connection to a variety of
host microcontrollers.
3 Hardware requirements
●ZigBee adapter board
●ZigBee module SPZB32W
●VDC / 2 A isolated power supply is recommended
●One JTAG programmer/debugger dongle (J-Link from SEGGER or IAR Systems™ is
recommended). It is unnecessary if no modifications to the firmware code have been
performed.
24/40Doc ID 022813 Rev 2
UM1519Board configuration
4 Board configuration
4.1 STM322xG-EVAL demonstration board setup
Set up the STM322xG-EVAL board as follows:
●Keep jumper JP16, JP21 and JP22 not fitted
●Set JP5 in 1-2 position, and JP6 in 2-3 position
●Disconnect motor control board from CN5
●Remove MicroSD card from CN6
●Remove R115 and R140.
Set up the ZigBee-Dual IF EEprom adapter as follows:
●Place the adapter on the STM322xG-EVAL board so that it is well fixed on the
connectors CN2, CN3 and CN4.
●Set JP3 and JP4 in 1-2 position in order to set the communication between the
STM32W and STM32F2xx via UART or in 2-3 position to communicate via SPI.
●In order to address the dual interface EEPROM (M24LR64r) via I
be properly set. The I
2
C address of the EEPROM is composed as “1010 xxxx”. It
represents the device select code and consists of a 4-bit device type identifier, and a 3bit chip enable “Address” (E2, E1, E0) plus 1-bit for read/write operation. To address
the memory array, the 4-bit device type identifier is 1010b (0xA).
So, the second group of the device select code is the customizable part of the I
address of the memory. In detail, it is made up as follows:
–E2 is the sector protection bit. To access the user area memory it must be set to 0,
while to access the system area it is set to 1
–E1 and E0 are used to customize the I
2
C address
–The 8th bit is the read/write bit (RW). This bit is set to 1 for read and 0 for write
operations
–Setting JP1 and JP2 in position 1-2 results in having 0xA6 as the I
the EEPROM.
2
C, JP1 and JP2 must
2
C
2
C address for
4.2 STM322xG-EVAL and ZigBee adapter with M24LR64-r
memory
The connections between the MCU and the ZigBee module + EEPROM dual interface are
shown inTab l e 1 3.
Information in this document is provided solely in connection with ST products. STMicroelectronics NV and its subsidiaries (“ST”) reserve the
right to make changes, corrections, modifications or improvements, to this document, and the products and services described herein at any
time, without notice.
All ST products are sold pursuant to ST’s terms and conditions of sale.
Purchasers are solely responsible for the choice, selection and use of the ST products and services described herein, and ST assumes no
liability whatsoever relating to the choice, selection or use of the ST products and services described herein.
No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this
document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products
or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such
third party products or services or any intellectual property contained therein.
UNLESS OTHERWISE SET FORTH IN ST’S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED
WARRANTY WITH RESPECT TO THE USE AND/OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (AND THEIR EQUIVALENTS UNDER THE LAWS
OF ANY JURISDICTION), OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT.
UNLESS EXPRESSLY APPROVED IN WRITING BY TWO AUTHORIZED ST REPRESENTATIVES, ST PRODUCTS ARE NOT
RECOMMENDED, AUTHORIZED OR WARRANTED FOR USE IN MILITARY, AIR CRAFT, SPACE, LIFE SAVING, OR LIFE SUSTAINING
APPLICATIONS, NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY,
DEATH, OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE. ST PRODUCTS WHICH ARE NOT SPECIFIED AS "AUTOMOTIVE
GRADE" MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER’S OWN RISK.
Resale of ST products with provisions different from the statements and/or technical features set forth in this document shall immediately void
any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever, any
liability of ST.
ST and the ST logo are trademarks or registered trademarks of ST in various countries.
Information in this document supersedes and replaces all information previously supplied.
The ST logo is a registered trademark of STMicroelectronics. All other names are the property of their respective owners.