STM8

来自Jack's Lab
(版本间的差异)
跳转到: 导航, 搜索
(STM8S105K6)
(Upload)
 
第132行: 第132行:
  
 
The STM8 SWIM protocol (STLink) is well documented in [http://www.st.com/content/ccc/resource/technical/document/user_manual/ca/89/41/4e/72/31/49/f4/CD00173911.pdf/files/CD00173911.pdf/jcr:content/translations/en.CD00173911.pdf UM0470]
 
The STM8 SWIM protocol (STLink) is well documented in [http://www.st.com/content/ccc/resource/technical/document/user_manual/ca/89/41/4e/72/31/49/f4/CD00173911.pdf/files/CD00173911.pdf/jcr:content/translations/en.CD00173911.pdf UM0470]
 +
 +
<source lang=bash>
 +
$ tools/stm8flash/stm8flash.exe -c stlinkv2 -p stm8s105k4 -s flash -w /c/Users/Jack/AppData/Local/Temp/arduino_build_893847/AnalogReadSerial.ino.hex
 +
Determine FLASH area
 +
Writing Intel hex file 7862 bytes at 0x8000... OK
 +
Bytes written: 7862
 +
</source>
  
 
<br>
 
<br>

2020年4月23日 (四) 20:59的最后版本

目录

[编辑] 1 STM8S105K6

  • 2 KB RAM (0x0000 ~ 0x7FF, including 512B stack)
  • 1 KB EEPROM (0x4000 ~ 0x43FF)
  • 32 KB Flash (0x8080 ~ 0xFFFF)
    • (16KB of STM8S105K4)


  • 16 MHz advanced STM8 core
  • 10-bit, ±1 LSB ADC with up to 10 multiplexed channels ADC
  • UART with clock output for SmartCard, IrDA, LIN master mode
  • SPI interface up to 8 Mbit/s
  • I2C interface up to 400 kbit/s
  • Up to 38 I/Os on a 48-pin package


  • 96-bit unique key for each device
  • 2.95 to 5.5 V operating voltage


STM8S105K6 Datasheet

STM8S105K-QFP32-pinmap.jpg


[编辑] 2 Arduino Like PinMap

    PD6, //D0  RX
    PD5, //D1  TX
    PD4, //D2
    PD3, //D3
    PD2, //D4
    PD1, //D5
    PD0, //D6

    PD7, //D7

    PE5, //D8  SPI_CS

    PC7, //D9  SPI_MISO
    PC6, //D10 SPI_MOSI
    PC5, //D11 SPI_SCK
    PC4, //D12  PWM
    PC3, //D13  PWM
    PC2, //D14  PWM
    PC1, //D15  PWM

    PB0, //D16 A0
    PB1, //D17 A1
    PB2, //D18 A2
    PB3, //D19 A3
    PB4, //D20 A4 I2C_SCL
    PB5, //D21 A5 I2C_SDA

    PF4, //D22 A6


[编辑] 3 STM8S208RB

> STM8S208RB Datasheet

  • 6KB RAM (0x0000 ~ 0x17FF, including 1024B stack)
  • 2KB EEPROM (0x4000 ~ 0x47FF)
  • 128KB Flash (0x8080 ~ 0x2 7FFF)
  • 16MHz clock



[编辑] 4 STM8L152R8

> STM8L152R8 Datasheet


  • 4KB RAM (0x0000 ~ 0x0FFF, including 513B stack)
  • 2KB EEPROM (0x1000 ~ 0x1FFF)
  • 64KB Flash (0x8080 ~ 0x1 7FFF)


  • 16MHz clock
  • SPI x2
  • I2C x1
  • UART x3


[编辑] 5 Toolchain

[编辑] 5.1 STM8Tools


[编辑] 5.2 SDCC


[编辑] 5.3 i686-mingw32



[编辑] 5.4 Github


[编辑] 6 Upload

The STM8 SWIM protocol (STLink) is well documented in UM0470

$ tools/stm8flash/stm8flash.exe -c stlinkv2 -p stm8s105k4 -s flash -w /c/Users/Jack/AppData/Local/Temp/arduino_build_893847/AnalogReadSerial.ino.hex
Determine FLASH area
Writing Intel hex file 7862 bytes at 0x8000... OK
Bytes written: 7862


[编辑] 6.1 Hardware


[编辑] 6.2 Connections

  • The RST is connected to ESP8266 GPIO5 (D1 on NodeMCU).
  • The SWIM is connected to ESP8266 GPIO4 (D2 on NodeMCU) via a 1kΩ pull-up resistor
  • 3.3V --- VCC_3.3V
  • GND --- GND


[编辑] 6.3 Software



[编辑] 7 Debug



[编辑] 8 Reference









个人工具
名字空间

变换
操作
导航
工具箱