STM32F103xx IO

 

STM32F103 시리즈는 최대 72Mhz까지 동작합니다. 그렇다고 모든 기능이 72Mh로 동작하는 것은 아니고, 각 기능마다 약간씩 다릅니다. 그 중에서 I/O 토글링은 18Mhz까지 제어할 수 있습니다.

 

 

 

 

While 사용

 

 

 

 

위와 같이 기본값을 설정하고 main 에서 while문으로 PORTE의 4번핀을 토글하게 되면

18Mhz로 동작할거 같은데 실제로는 아래처럼 3.13Mhz 로 파형이 나옵니다.

 

 

 

 

 

 

 

Optimizations

 

 

이는 컴파일 옵션에서 옵티마이즈가 None으로 되어 있어서 그런 겁니다.

아래처럼 옵션에서 High(Speed)로 지정하면 됩니다.

 

 

 

 

그러면 약 8Mhz까지 나옵니다.

 

 

 

 

왜 8Mhz 까지만 나올까요?

그것은 while(1) 때문입니다. 아래 2줄을 수행한 후 while문을 검사해야 하기 때문에 8Mhz 이상이 나오지 않는 겁니다.

GPIOE->BSRR = GPIO_Pin_4;
GPIOE->BRR = GPIO_Pin_4;

 

 

 

 

그렇다면 어떻게 해야 18Mhz 를 얻을 수 있을까요?

While(1)을 사용하지 않으면 될텐데…. While(1)을 사용하지 않는다면 프로그램은 무한히 실행되지 않을 겁니다.

 

그냥 while(1) 문 안에 무한히 토글해주면 됩니다.

 

 

while(1){

GPIOE->BSRR = GPIO_Pin_4;

GPIOE->BRR = GPIO_Pin_4;

GPIOE->BSRR = GPIO_Pin_4;

GPIOE->BRR = GPIO_Pin_4;

}

13.0902Mhz

 

 

 

 

while(1){

GPIOE->BSRR = GPIO_Pin_4;

GPIOE->BRR = GPIO_Pin_4;

GPIOE->BSRR = GPIO_Pin_4;

GPIOE->BRR = GPIO_Pin_4;

GPIOE->BSRR = GPIO_Pin_4;

GPIOE->BRR = GPIO_Pin_4;

}

13.4992Mhz

 

 

 

 

아래처럼 하면 거의 18Mhz에 가까워 집니다.

 

 

 

출처 : http://whiteat.com/56416

 

 

'[STM32] > 정리' 카테고리의 다른 글

STM32F103xx 시리즈 18Mhz로 토글  (0) 2012.03.13
Posted by WhiteAT

댓글을 달아 주세요

 

 

STM32F103ZET6

 

DATA SHEET:

 

패키지는 LQFP144 (20x20 mm) 입니다.

 

 

 

 

Features

 

  • Core: ARM 32-bit Cortex™-M3 CPU
    • 72 MHz maximum frequency, 1.25 DMIPS/MHz (Dhrystone 2.1) performance at 0 wait state memory access
    • Single-cycle multiplication and hardware division
  • Memories
    • 256 to 512 Kbytes of Flash memory
    • up to 64 Kbytes of SRAM
    • Flexible static memory controller with 4 Chip Select. Supports Compact Flash, SRAM, PSRAM, NOR and NAND memories
    • LCD parallel interface, 8080/6800 modes
  • Clock, reset and supply management
    • 2.0 to 3.6 V application supply and I/Os
    • POR, PDR, and programmable voltage detector (PVD)
    • 4-to-16 MHz crystal oscillator
    • Internal 8 MHz factory-trimmed RC
    • Internal 40 kHz RC with calibration
    • 32 kHz oscillator for RTC with calibration
  • Low power
    • Sleep, Stop and Standby modes
    • VBAT supply for RTC and backup registers
  • 3 × 12-bit, 1 μs A/D converters (up to 21 channels)
    • Conversion range: 0 to 3.6 V
    • Triple-sample and hold capability
    • Temperature sensor
  • 2 × 12-bit D/A converters
  • DMA: 12-channel DMA controller
    • Supported peripherals: timers, ADCs, DAC, SDIO, I2Ss, SPIs, I2Cs and USARTs
  • Debug mode
    • Serial wire debug (SWD) & JTAG interfaces
    • Cortex-M3 Embedded Trace Macrocell™
  • Up to 112 fast I/O ports
    • 51/80/112 I/Os, all mappable on 16 external interrupt vectors and almost all 5 V-tolerant
  • Up to 11 timers
    • Up to four 16-bit timers, each with up to 4 IC/OC/PWM or pulse counter and quadrature (incremental) encoder input
    • 2 × 16-bit motor control PWM timers with dead-time generation and emergency stop
    • 2 × watchdog timers (Independent and Window)
    • SysTick timer: a 24-bit downcounter
    • 2 × 16-bit basic timers to drive the DAC
  • Up to 13 communication interfaces
    • Up to 2 × I2C interfaces (SMBus/PMBus)
    • Up to 5 USARTs (ISO 7816 interface, LIN, IrDA capability, modem control)
    • Up to 3 SPIs (18 Mbit/s), 2 with I2S interface multiplexed
    • CAN interface (2.0B Active)
    • USB 2.0 full speed interface
    • SDIO interface
  • CRC calculation unit, 96-bit unique ID
  • ECOPACK®packages

 

 

 

 

'[STM32] > IC' 카테고리의 다른 글

STM32F103ZET6, STM32F103xE  (0) 2012.03.09
STM32F215RET6, STM32F215XX  (0) 2012.03.08
STM32F103RBT6, STM32F103xB  (0) 2012.03.08
STM32F103VET6, STM32F103xE  (0) 2012.03.08
STM32F205RET6, STM32F205xx  (0) 2012.03.08
STM32F103RCT6, STM32F103xC  (0) 2012.03.08
Posted by WhiteAT

댓글을 달아 주세요

 

STM32F103RBT6

 

DATA SHEET:



 

 

 

 

 

Features

 

■ ARM 32-bit Cortex™-M3 CPU Core

– 72 MHz maximum frequency, 1.25 DMIPS/MHz (Dhrystone 2.1) performance at 0 wait state memory access

– Single-cycle multiplication and hardware division

■ Memories

– 64 or 128 Kbytes of Flash memory

– 20 Kbytes of SRAM

■ Clock, reset and supply management

– 2.0 to 3.6 V application supply and I/Os

– POR, PDR, and programmable voltage detector (PVD)

– 4-to-16 MHz crystal oscillator

– Internal 8 MHz factory-trimmed RC

– Internal 40 kHz RC

– PLL for CPU clock

– 32 kHz oscillator for RTC with calibration

■ Low power

– Sleep, Stop and Standby modes

– VBAT supply for RTC and backup registers

■ 2 x 12-bit, 1 μs A/D converters (up to 16 channels)

– Conversion range: 0 to 3.6 V

– Dual-sample and hold capability

– Temperature sensor

■ DMA

– 7-channel DMA controller

– Peripherals supported: timers, ADC, SPIs, I2Cs and USARTs

■ Up to 80 fast I/O ports

– 26/37/51/80 I/Os, all mappable on 16 external interrupt vectors and almost all 5 V-tolerant

■ Debug mode

– Serial wire debug (SWD) & JTAG interfaces

■ 7 timers

– Three 16-bit timers, each with up to 4 IC/OC/PWM or pulse counter and quadrature (incremental) encoder input

– 16-bit, motor control PWM timer with deadtime generation and emergency stop

– 2 watchdog timers (Independent and Window)

– SysTick timer 24-bit downcounter

■ Up to 9 communication interfaces

– Up to 2 x I2C interfaces (SMBus/PMBus)

– Up to 3 USARTs (ISO 7816 interface, LIN, IrDA capability, modem control)

– Up to 2 SPIs (18 Mbit/s)

– CAN interface (2.0B Active)

– USB 2.0 full-speed interface

■ CRC calculation unit, 96-bit unique ID

■ Packages are ECOPACK®

 

 

 

 

 

'[STM32] > IC' 카테고리의 다른 글

STM32F103ZET6, STM32F103xE  (0) 2012.03.09
STM32F215RET6, STM32F215XX  (0) 2012.03.08
STM32F103RBT6, STM32F103xB  (0) 2012.03.08
STM32F103VET6, STM32F103xE  (0) 2012.03.08
STM32F205RET6, STM32F205xx  (0) 2012.03.08
STM32F103RCT6, STM32F103xC  (0) 2012.03.08
Posted by WhiteAT

댓글을 달아 주세요

 

 STM32F103VET6

 

DATA SHEET:



 

 

 

 

 

 

Features

 

  • Core: ARM 32-bit Cortex™-M3 CPU
    • 72 MHz maximum frequency, 1.25 DMIPS/MHz (Dhrystone 2.1) performance at 0 wait state memory access
    • Single-cycle multiplication and hardware division
  • Memories
    • 256 to 512 Kbytes of Flash memory
    • up to 64 Kbytes of SRAM
    • Flexible static memory controller with 4 Chip Select. Supports Compact Flash, SRAM, PSRAM, NOR and NAND memories
    • LCD parallel interface, 8080/6800 modes
  • Clock, reset and supply management
    • 2.0 to 3.6 V application supply and I/Os
    • POR, PDR, and programmable voltage detector (PVD)
    • 4-to-16 MHz crystal oscillator
    • Internal 8 MHz factory-trimmed RC
    • Internal 40 kHz RC with calibration
    • 32 kHz oscillator for RTC with calibration
  • Low power
    • Sleep, Stop and Standby modes
    • VBAT supply for RTC and backup registers
  • 3 × 12-bit, 1 μs A/D converters (up to 21 channels)
    • Conversion range: 0 to 3.6 V
    • Triple-sample and hold capability
    • Temperature sensor
  • 2 × 12-bit D/A converters
  • DMA: 12-channel DMA controller
    • Supported peripherals: timers, ADCs, DAC, SDIO, I2Ss, SPIs, I2Cs and USARTs
  • Debug mode
    • Serial wire debug (SWD) & JTAG interfaces
    • Cortex-M3 Embedded Trace Macrocell™
  • Up to 112 fast I/O ports
    • 51/80/112 I/Os, all mappable on 16 external interrupt vectors and almost all 5 V-tolerant
  • Up to 11 timers
    • Up to four 16-bit timers, each with up to 4 IC/OC/PWM or pulse counter and quadrature (incremental) encoder input
    • 2 × 16-bit motor control PWM timers with dead-time generation and emergency stop
    • 2 × watchdog timers (Independent and Window)
    • SysTick timer: a 24-bit downcounter
    • 2 × 16-bit basic timers to drive the DAC
  • Up to 13 communication interfaces
    • Up to 2 × I2C interfaces (SMBus/PMBus)
    • Up to 5 USARTs (ISO 7816 interface, LIN, IrDA capability, modem control)
    • Up to 3 SPIs (18 Mbit/s), 2 with I2S interface multiplexed
    • CAN interface (2.0B Active)
    • USB 2.0 full speed interface
    • SDIO interface
  • CRC calculation unit, 96-bit unique ID
  • ECOPACK®packages

 

 

 

 

'[STM32] > IC' 카테고리의 다른 글

STM32F215RET6, STM32F215XX  (0) 2012.03.08
STM32F103RBT6, STM32F103xB  (0) 2012.03.08
STM32F103VET6, STM32F103xE  (0) 2012.03.08
STM32F205RET6, STM32F205xx  (0) 2012.03.08
STM32F103RCT6, STM32F103xC  (0) 2012.03.08
STM32F103R6T6A, STM32F103x6  (0) 2012.03.08
Posted by WhiteAT

댓글을 달아 주세요

 

STM32F103VCT6

 

DATA SHEET:

 

 

 

 

 

Features

 

 

■ Core: ARM 32-bit Cortex™-M3 CPU

– 72 MHz maximum frequency, 1.25 DMIPS/MHz (Dhrystone 2.1) performance at 0 wait state memory access

– Single-cycle multiplication and hardware division

■ Memories

– 256 to 512 Kbytes of Flash memory

– up to 64 Kbytes of SRAM

– Flexible static memory controller with 4 Chip Select. Supports Compact Flash, SRAM, PSRAM, NOR and NAND memories

– LCD parallel interface, 8080/6800 modes

■ Clock, reset and supply management

– 2.0 to 3.6 V application supply and I/Os

– POR, PDR, and programmable voltage detector (PVD)

– 4-to-16 MHz crystal oscillator

– Internal 8 MHz factory-trimmed RC

– Internal 40 kHz RC with calibration

– 32 kHz oscillator for RTC with calibration

■ Low power

– Sleep, Stop and Standby modes

– VBAT supply for RTC and backup registers

■ 3 × 12-bit, 1 μs A/D converters (up to 21 channels)

– Conversion range: 0 to 3.6 V

– Triple-sample and hold capability

– Temperature sensor

■ 2 × 12-bit D/A converters

■ DMA: 12-channel DMA controller

– Supported peripherals: timers, ADCs, DAC, SDIO, I2Ss, SPIs, I2Cs and USARTs

■ Debug mode

– Serial wire debug (SWD) & JTAG interfaces

– Cortex-M3 Embedded Trace Macrocell™

■ Up to 112 fast I/O ports

– 51/80/112 I/Os, all mappable on 16 external interrupt vectors and almost all 5 V-tolerant

■ Up to 11 timers

– Up to four 16-bit timers, each with up to 4 IC/OC/PWM or pulse counter and quadrature (incremental) encoder input

– 2 × 16-bit motor control PWM timers with dead-time generation and emergency stop

– 2 × watchdog timers (Independent and Window)

– SysTick timer: a 24-bit downcounter

– 2 × 16-bit basic timers to drive the DAC

■ Up to 13 communication interfaces

– Up to 2 × I2C interfaces (SMBus/PMBus)

– Up to 5 USARTs (ISO 7816 interface, LIN, IrDA capability, modem control)

– Up to 3 SPIs (18 Mbit/s), 2 with I2S interface multiplexed

– CAN interface (2.0B Active)

– USB 2.0 full speed interface

– SDIO interface

■ CRC calculation unit, 96-bit unique ID

■ ECOPACK® packages

 

 

 

 

 

 

 

 

 

 

Posted by WhiteAT

댓글을 달아 주세요

 

STM32F103RCT6

 

 

DATA SHEET:
 


 

 

 

Features

 

 

■ Core: ARM 32-bit Cortex™-M3 CPU

– 72 MHz maximum frequency, 1.25 DMIPS/MHz (Dhrystone 2.1) performance at 0 wait state memory access

– Single-cycle multiplication and hardware division

■ Memories

– 256 to 512 Kbytes of Flash memory

– up to 64 Kbytes of SRAM

– Flexible static memory controller with 4 Chip Select. Supports Compact Flash, SRAM, PSRAM, NOR and NAND memories

– LCD parallel interface, 8080/6800 modes

■ Clock, reset and supply management

– 2.0 to 3.6 V application supply and I/Os

– POR, PDR, and programmable voltage detector (PVD)

– 4-to-16 MHz crystal oscillator

– Internal 8 MHz factory-trimmed RC

– Internal 40 kHz RC with calibration

– 32 kHz oscillator for RTC with calibration

■ Low power

– Sleep, Stop and Standby modes

– VBAT supply for RTC and backup registers

■ 3 × 12-bit, 1 μs A/D converters (up to 21 channels)

– Conversion range: 0 to 3.6 V

– Triple-sample and hold capability

– Temperature sensor

■ 2 × 12-bit D/A converters

■ DMA: 12-channel DMA controller

– Supported peripherals: timers, ADCs, DAC, SDIO, I2Ss, SPIs, I2Cs and USARTs

■ Debug mode

– Serial wire debug (SWD) & JTAG interfaces

– Cortex-M3 Embedded Trace Macrocell™

■ Up to 112 fast I/O ports

– 51/80/112 I/Os, all mappable on 16 external interrupt vectors and almost all 5 V-tolerant

■ Up to 11 timers

– Up to four 16-bit timers, each with up to 4 IC/OC/PWM or pulse counter and quadrature (incremental) encoder input

– 2 × 16-bit motor control PWM timers with dead-time generation and emergency stop

– 2 × watchdog timers (Independent and Window)

– SysTick timer: a 24-bit downcounter

– 2 × 16-bit basic timers to drive the DAC

■ Up to 13 communication interfaces

– Up to 2 × I2C interfaces (SMBus/PMBus)

– Up to 5 USARTs (ISO 7816 interface, LIN, IrDA capability, modem control)

– Up to 3 SPIs (18 Mbit/s), 2 with I2S interface multiplexed

– CAN interface (2.0B Active)

– USB 2.0 full speed interface

– SDIO interface

■ CRC calculation unit, 96-bit unique ID

■ ECOPACK® packages

 

 

 

 

 

 

'[STM32] > IC' 카테고리의 다른 글

STM32F103VET6, STM32F103xE  (0) 2012.03.08
STM32F205RET6, STM32F205xx  (0) 2012.03.08
STM32F103RCT6, STM32F103xC  (0) 2012.03.08
STM32F103R6T6A, STM32F103x6  (0) 2012.03.08
STM32F103CBT6, STM32F103xB  (0) 2012.03.07
STM32F103x4, STM32F103C4T6A  (0) 2012.03.07
Posted by WhiteAT

댓글을 달아 주세요

 

 

STM32F103R6T6A

 

 

DATA SHEET:

 

 

 

 

 

Features

 

ARM 32-bit Cortex™-M3 CPU Core

– 72 MHz maximum frequency,1.25 DMIPS/MHz (Dhrystone 2.1) performance at 0 wait state memory access

– Single-cycle multiplication and hardware division

■ Memories

– 16 or 32 Kbytes of Flash memory

– 6 or 10 Kbytes of SRAM

■ Clock, reset and supply management

– 2.0 to 3.6 V application supply and I/Os

– POR, PDR, and programmable voltage detector (PVD)

– 4-to-16 MHz crystal oscillator

– Internal 8 MHz factory-trimmed RC

– Internal 40 kHz RC

– PLL for CPU clock

– 32 kHz oscillator for RTC with calibration

■ Low power

– Sleep, Stop and Standby modes

– VBAT supply for RTC and backup registers

■ 2 x 12-bit, 1 μs A/D converters (up to 16 channels)

– Conversion range: 0 to 3.6 V

– Dual-sample and hold capability

– Temperature sensor

■ DMA

– 7-channel DMA controller

– Peripherals supported: timers, ADC, SPIs, I2Cs and USARTs

■ Up to 51 fast I/O ports

– 26/37/51 I/Os, all mappable on 16 external interrupt vectors and almost all 5 V-tolerant

■ Debug mode

– Serial wire debug (SWD) & JTAG interfaces

■ 6 timers

– Two 16-bit timers, each with up to 4 IC/OC/PWM or pulse counter and quadrature (incremental) encoder input

– 16-bit, motor control PWM timer with deadtime generation and emergency stop

– 2 watchdog timers (Independent and Window)

– SysTick timer 24-bit downcounter

■ 6 communication interfaces

– 21 x I2C interface (SMBus/PMBus)

– 2 × USARTs (ISO 7816 interface, LIN, IrDA capability, modem control)

– 1 × SPI (18 Mbit/s)

– CAN interface (2.0B Active)

– USB 2.0 full-speed interface

■ CRC calculation unit, 96-bit unique ID

■ Packages are ECOPACK®

 

 

 

 

'[STM32] > IC' 카테고리의 다른 글

STM32F103VET6, STM32F103xE  (0) 2012.03.08
STM32F205RET6, STM32F205xx  (0) 2012.03.08
STM32F103RCT6, STM32F103xC  (0) 2012.03.08
STM32F103R6T6A, STM32F103x6  (0) 2012.03.08
STM32F103CBT6, STM32F103xB  (0) 2012.03.07
STM32F103x4, STM32F103C4T6A  (0) 2012.03.07
Posted by WhiteAT

댓글을 달아 주세요

 

USB-FS-Device development kit User's Manual     

 

 

매뉴얼 다운로드:

 

 




STM32 의 USB 에 관련된 매뉴얼입니다.

아래와 같은 내용이 포함되어 있습니다.

 

STM32 USB-FS-Device firmware library

Joystick mouse demo

Custom HID demo

Device firmware upgrade

Mass storage demo

Virtual COM port demo

USB voice speaker demo

USB audio streaming demo

 

 

 

 

'[STM32] > Manual' 카테고리의 다른 글

USB-FS-Device development kit User’s Manual  (0) 2012.02.23
Posted by WhiteAT

댓글을 달아 주세요

 

STM32 Virtual COM Port Driver

다른 칩셋과 마찬가지로 STM32 로 작성된 가상 COM 포트 드라이버를 사용하기 위해서는 별도의 드라이버를 설치해야 합니다.

 

드라이버가 설치되지 않았다면 아래와 같이 드라이버 인식을 실패합니다.

 

 

 

 

함께 제공하는 설치정보파일( iarvircomport.inf)로 설치를 시도해도 제대로 인식하지 못할 수 있습니다.

 

 

 

 

 

 

 

 

 

STM32 Virtual COM Port Driver 설치

 

드라이버 설치파일:






또는 http://www.st.com/internet/mcu/product/164491.jsp 에서 다운 받을 수 있습니다.

 

 

 

 

압축 파일을 풀면 4개의 파일이 있습니다.

(비스타 또는 7 에서는 필히 압축을 푼후 관리자모드로 설치를 해야 합니다.)

 

 

 

  

 

 

 

현재 사용중인 OS에 맞는 드라이버를 설치하면 됩니다.

VCP_V1.3.1_Setup.exe: 32비트용 드라이버

VCP_V1.3.1_Setup_x64.exe: 64비트용 드라이버

 

 

 



 

여기서는 64비트용을 설치해보겠습니다.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

그리고, USB 케이블을 다시 연결해도 자동으로 설치되지는 않는다면 수동으로 설치해야 하는데, 아래처럼 직접 경로를 지정하여 처리할 수 있습니다.

 

 

 

 

 

 

 

 

 

 

경로를 C:\Program Files (x86)\STMicroelectronics\Software\Virtual COM Port Driver 로 지정합니다.

 

 

 

 

해당 파일에 게시자 정보가 없어 경고가 나타날 수 있습니다.

해당 제품을 사용하려면 당연히 설치해야 합니다.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

'[STM32] > Tools' 카테고리의 다른 글

ST-LINK V2  (0) 2016.09.08
STM32 Virtual COM Port Driver  (0) 2012.02.20
Posted by WhiteAT

댓글을 달아 주세요