user's manual of et-stamp-stm32

12

Upload: arturocanalizo

Post on 23-Oct-2015

105 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: User's Manual of Et-stamp-stm32
Page 2: User's Manual of Et-stamp-stm32

User’s Manual of Board Microcontroller “ET-ARM STAMP STM32 (Cortex-M3)

WWW.ETT.CO.TH 1

38ixc Figure displays structure of Board ET-ARM STAMP STM32.

Page 3: User's Manual of Et-stamp-stm32

User’s Manual of Board Microcontroller “ET-ARM STAMP STM32 (Cortex-M3)

WWW.ETT.CO.TH 2

Features of Board ET-ARM STAMP STM32

1. Use MCU 32Bit ARM Cortex-M3 64Pin (LQFP) of “STmicroelectronics”

2. Use Crystal 8.00MHz + Phase-Locked Loop (PLL), Run 72MHz frequency with speed 1.25 DMIPS/MHz to process data that is equivalent to 90MIPS

3. Has RTC (Real Time Clock) Circuit with XTAL 32.768KHz and Battery Backup

4. Support In-System Programming (ISP) and In-Application Programming (IAP) through On-Chip Boot-Loader Software via Port USART1 (RS232)

5. Has RS232 Communication Circuit that uses Connector 4-PIN 1 Channel standard ETT

6. Has 48 Bit GPIO with 5V-Tolerant for independent applications

7. Use +3.3V Power Supply 8. Connector is placed on 50 Pin Header with a distance

of 2.54mm (100mil) (25 pins per side) with a distance of 1.5 inch (1500mil/38.1mm), so it is quite easy to use and expand I/O Circuit. Moreover, it can be used with Project Board and PCB.

Specification Peripheral

ET-ARM STAMP STM32F103/128

ET-ARM STAMP STM32F103/512

MCU STM32F103RBT6 STM32F103RET6

Flash 128K 512K

RAM 20K 64K

SPI 2 3 (I2S x 2)

I2C 2 2

USART 3 5

USB 1 1

CAN 1 1

SDIO - 1

ADC 12 Bit 16 16

DAC 12 Bit - 2

Page 4: User's Manual of Et-stamp-stm32

User’s Manual of Board Microcontroller “ET-ARM STAMP STM32 (Cortex-M3)

WWW.ETT.CO.TH 3

Structure of Board ET-ARM STAMP STM32

Figure Show positions of components on Board ET-ARM STAMP STM32.

• No.1 is MCU on board. • No.2 is Connector USART1 (RS232) for use and

download. • No.3 is Connector +3V Battery Backup-RTC. • No.4 is LED Power. • No.5 is LED BOOT0 (BOOT0=1). • No.6 is Switch BOOT0 that can be used with Jumper J1

to choose operation mode of Board between Download from USART1 or Normal RUN. In this case, if it is ON, it is Download; on the other hand, if it is OFF, it is RUN.

• No.7 is Jumper (BOOT1) that can be used with BOOT0 to choose operation mode of board between Download from USART1 or Normal RUN. In this case, it always is set at ISP position.

• No.8 is Switch RESET for RESET operation of MCU. • No.9 is connecting point of GND. • No.10 is +3.3V Power Supply.

1

7 8

4 5

6

23

10

9

Page 5: User's Manual of Et-stamp-stm32

User’s Manual of Board Microcontroller “ET-ARM STAMP STM32 (Cortex-M3)

WWW.ETT.CO.TH 4

Application of RS232

Port RS232 is signal RS232 that has already been converted signal MAX3232, so USART1 can be connected with signal RS232 to receive-transmit data. Moreover, USART1 can be used to be ISP Download to download Hex File into MCU. In this case, it must be used with Jumper (BOOT1) SW (BOOT0) and SW (RESET) to reset CPU to start running in Boot-Loader Mode to download Hex File into CPU (see more detail from “To Download Hex File into MCU of Board”).

2 41 3

+3V3

RXD1

TXD1

GND

USART1(Download)

• USART1 uses signal Pin from PA9(TXD1) and PA10(RXD1).

The Cable that is used to connect RS232 between Comport of computer PC and Connector USART-1 and USART-2 of Board ET-ARM STAMP STM32 is shown as follows;

162738495

DB9(FEMALE)

1234

ET-RS232

RXDTXDGND

RXDRTS

DSR

TXDCTSDTR

GND

CD

RI

RS232-PC

Figure display the Cable circuit for RS232.

Page 6: User's Manual of Et-stamp-stm32

User’s Manual of Board Microcontroller “ET-ARM STAMP STM32 (Cortex-M3)

WWW.ETT.CO.TH 5

Download Hex File into MCU of Board To download Hex File into Flash Memory of MCU inside board is to use Program Flash Loader of “STMicroelectronics” that is connected to MCU through Serial Port of Computer PC. This program can be downloaded free from website www.st.com. Procedures to Download HEX File into MCU

1. Interface RS232 Cable between RS232 Serial Port Communication of PC and Board USART1.

2. Supply power into board and user can see that LED PWR is in status ON.

3. Run Program Flash Loader; if it is version demo 1.1, it will show the result as shown in the picture below;

4. Set initial values for program; if using with Board

ET-ARM STAMP STM32 of ETT, please set values into program as follows;

4.1 Set COM Port according to the actually used COM Port number (in the example, it is COM4).

Page 7: User's Manual of Et-stamp-stm32

User’s Manual of Board Microcontroller “ET-ARM STAMP STM32 (Cortex-M3)

WWW.ETT.CO.TH 6

4.2 Set Baud Rate in the range of 1200-115200; if computer has the problem or Error when using very high Baud Rate, please reduce the Baud Rate vales; in this example, it is 115200.

4.3 Set Parity Bit of Serial Port; it this case, we recommend user to choose it as None.

4.4 Set Timeout of the communication; in the example, it is 1 second.

4.5 RESET MCU to run in Boot Loader as following procedures;

Set Jumper BOOT1 on ISP side (Signal BOOT1 = 0).

ON Switch BOOT0 and user can see LED BOOT0 in status ON (Signal BOOT0 = 1).

Press Switch RESET and remove it; it makes CPU start running in Boot Mode.

5. Click “Next” to start downloading; if everything is OK, program will read status from CPU and report the results to user. If using STM32F103RBT6, it will display results as shown in the picture below;

6. Click “Next”, Program Flash Loader starts displaying the statuses that are read from MCU to user. If using STM32F103RBT6, it will display results as shown in the picture below;

Page 8: User's Manual of Et-stamp-stm32

User’s Manual of Board Microcontroller “ET-ARM STAMP STM32 (Cortex-M3)

WWW.ETT.CO.TH 7

7. Click “Next” to go to the next step.

8. Click “Next”, Program starts downloading data into MCU instantly and user can see its operation through Status bar. In this procedure, user must wait until

Page 9: User's Manual of Et-stamp-stm32

User’s Manual of Board Microcontroller “ET-ARM STAMP STM32 (Cortex-M3)

WWW.ETT.CO.TH 8

the operation of program is complete as shown in the picture below.

9. When the operation of program is complete, click “Finish” and OFF Switch BOOT0, user can see that LED BOOT0 is in status off. Then, press Switch RESET on board and MCU will start running follow the downloaded program instantly.

Page 10: User's Manual of Et-stamp-stm32

User’s Manual of Board Microcontroller “ET-ARM STAMP STM32 (Cortex-M3)

WWW.ETT.CO.TH 9

Errors while downloading by Program Flash Loader V1.1

Sometimes, when user downloads HEX File into MCU through Boot Loader by RS232, program will report the errors because it can not be connected to Boot Loader as shown in the example below.

This error is occurred because of Program Flash Loader can not communicate with MCU through Boot Loader by RS232. There are may causes as shown below;

• User does not RESET MCU to run in Boot Loader yet before click “Next” in the first step of command Program Flash Loader. In this case, user can check whether Jumper BOOT1 is set to ISP side and SW-BOOT0 must be set in ON position (LED BOOT0 is ON).

• Set COM port number not corresponding with the actually connected.

If user follows all procedures correctly but it remains the error, it means that the error is occurred because of Program Flash Loader. From the actually tested, the problem is occurred because of data that is junk or garbage inside Buffer of Port RS232, so it makes Program Flash Loader run incorrectly. There are many causes as described below;

• It uses the same channel of RS232 Serial Port for

downloading and using but it uses different parameter values. For example, if downloading data by Program Flash Loader, it uses Baud Rate 115200; after downloading is complete, it uses Baud Rate 9600 for operating program of MCU to transmit-receive data with RS232. Moreover, if Download Cable is plugged all the time and user wants to download the new data

Page 11: User's Manual of Et-stamp-stm32

User’s Manual of Board Microcontroller “ET-ARM STAMP STM32 (Cortex-M3)

WWW.ETT.CO.TH 10

after user has already tested program completely, it will be error as mentioned above. We recommend user to initially solve the problem and decrease the mistake as follows;

o Don’t set Baud Rate for downloading and using with different parameter values; it is the best if setting them with the same value.

o If user tests the operation of the written program that does not use any RS232, user must remove RS232 Cable from board instantly to reduce data that is junk or garbage in Buffer of RS232 after download code completely.

o If Code Command in program of MCU runs as printing data through Port RS232 all the time, user must reset MCU to stop transmitting data to Port RS232 before opening Program Flash Loader to download new Code. In this case, user resets it to run in Boot Loader first and then open Program Flash Loader.

o If it is Converter that converts Port USB/RS232, user must remove USB Cable before opening Program Flash Loader to clear data in Buffer first, re-plug USB cable and wait for awhile and finally, user can open Program Flash Loader without any problem.

o If your computer has Port RS232 more than 1; we recommend user to separate Port RS2232 for download and use independently.

Page 12: User's Manual of Et-stamp-stm32

A B C DDCBA

Title

Num

berRevision

Size

A4

Date:

6-Aug-2008

Sheet of File:

D:\ET-A

RM STA

MP STM

32.ddbD

rawn By:

PA0/W

KU

P/USA

RT2_CTS/AD

C0/TIM2_CH

1_ETR14

PA1/U

SART2_RTS/A

DC1/TIM

2_CH2

15

PA2/U

SART2_TX

/AD

C2/TIM2_CH

316

PA3/U

SART2_RX

/AD

C3/TIM2_CH

417

PA4/SPI1_N

SS/USA

RT2_CK/A

DC4

20

PA5/SPI1_SCK

/AD

C521

PA6/SPI1_M

ISO/A

DC6/TIM

3_CH1

22

PA7/SPI1_M

OSI/A

DC7/TIM

3_CH2

23

PA8/U

SART1_CK

/TIM1_CH

1/MCO

41

PA9/U

SART1_TX

/TIM1_CH

242

PA10/U

SART1_RX

/TIM1_CH

343

PA11/U

SART1_CTS/CA

NRX

/TIM1_CH

4/USBD

M44

PA12/U

SART1_RTS/CA

NTX

/TIM1_ETR/U

SBDP

45

PA13/JTM

S/SWD

IO46

PA14/JTCK

/SWCLK

49

PA15/JTD

I/TIM2_CH

1/SPI1_NSS

50

PB0/AD

C8/TIM3_CH

326

PB1/AD

C9/TIM3_CH

427

PB2/BOO

T128

PB3/JTDO

/TIM2_CH

2/SPI1_SCK55

PB4/JNTRST/TIM

3_CH1/SPI1_M

ISO56

PB5/I2C1_SMBA

I/TIM3_CH

2/SPI1_MO

SI57

PB6/I2C1_SCL/TIM4_CH

1/USA

RT1_TX58

PB7/I2C1_SDA

/TIM4_CH

2/USA

RT1_RX59

PB8/TIM4_CH

3/I2C1_SCL/CAN

RX61

PB9/TIM4_CH

4/I2C1_SDA

/CAN

TX62

PB10/I2C2_SCL/USA

RT3_TX/TIM

2_CH3

29

PB11/I2C2_SDA

/USA

RT3_RX/TIM

2_CH4

30

PB12/SPI2_NSS/I2C2_SM

BAI/U

SART3_CK

/TIM1_BK

IN33

PB13/SPI2_SCK/U

SART3_CTS/TIM

1_CH1N

34

PB14/SPI2_MISO

/USA

RT3_RTS/TIM1_CH

2N35

PB15/SPI2_MO

SI/TIM1_CH

3N36

PC0/AD

C108

PC1/AD

C119

PC2/AD

C1210

PC3/AD

C1311

PC4/AD

C1424

PC5/AD

C1525

PC6/TIM3_CH

137

PC7/TIM3_CH

238

PC8/TIM3_CH

339

PC9/TIM3_CH

440

PC10/USA

RT3_TX51

PC11/USA

RT3_RX52

PC12/USA

RT3_CK53

PC13/TAM

PER-RTC2

PC14/OSC32_IN

3

PC15/OSC32_O

UT

4

PD0/O

SC_IN5

PD1/O

SC_OU

T6

PD2/TIM

3_ETR54

BOO

T060

NRST

7

VBA

TT1

VD

D_1

32

VD

D_2

48

VD

D_3

64

VD

D_4

19

VD

D_A

13

VSS_1

31

VSS_2

47

VSS_3

63

VSS_4

18

VSS_A

12

U1

STM32F103RBT6(LQ

FP64)

C9100n

C8100n

C7100n

C6100n

+3V3

C5100n

+3V3

Y1

32.768kHz

C1610pF

C1710pF

Y2

8MH

z

C1822pF

C1922pF

R31M

D4

PMEG

4005ET

D3

PMEG

4005ET

C3

100n

+3V3

R210k

S1RESET +3V

3

C10100n

123

J5

BOO

T1

+3V3

R5

22k

C1+1

C1-3

C2+4

C2-5

R1O12

T1I11

R2O9

T2I10

VCC

16

V+

2

V-

6

GN

D15

R1I13

T1O14

R2I8

T2O7

U2

ICL3232

C12100n

C13100n

C14100n

C15100n

C11100n

+3V3

+3V3

RXD

-1TX

D-1

1234

J4USA

RT1(Dow

nload)

C410uF

PA9

PA10

PA10

PA9

PC10PC11

PB2

BOO

T0

PB2PD2

PA0

PA1

PA2

PA3

PA4

PA5

PA6

PA7

PA8

PA11

PA12

PA13

PA14

PA15

PB0PB1

PB3PB4PB5PB6PB7PB8PB9PB10PB11PB12PB13PB14PB15

PC0PC1PC2PC3PC4PC5PC6PC7PC8PC9

PC12PC13

RESET

L1

ferrite bead

R4100

12

J1BATT

12345678910111213141516171819202122232425

J2

12345678910111213141516171819202122232425

J3

+3V3

D1

PWR

R1560

+3V3

D2

3V6

C210uF

C1100n

PA0

PA1

PA2

PA3

PA4

PA5

PA6

PA7

PA8

PA9

PA10

PA11

PA12

PA13

PA14

PA15

PB0PB1PB2PB3PB4PB5PB6

PB7RESET

PD2

PC13PC12PC11PC10PC9PC8PC7PC6PC5PC4PC3PC2PC1PC0PB15PB14PB13PB12PB11PB10PB9PB8

213

546

S2 BOO

T0

+3V3

R6

22kBO

OT0

D5

BOO

T0=1R7

560

+3V3