STM8
来自Jack's Lab
(版本间的差异)
(→Toolchain) |
(→STM8S105K6) |
||
| 第20行: | 第20行: | ||
[[文件:STM8S105K-QFP32-pinmap.jpg]] | [[文件:STM8S105K-QFP32-pinmap.jpg]] | ||
| + | |||
| + | <br> | ||
| + | |||
| + | == Arduino Like PinMap == | ||
| + | |||
| + | <source lang=cpp> | ||
| + | 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 | ||
| + | </source> | ||
<br> | <br> | ||
2018年11月19日 (一) 14:25的版本
目录 |
1 STM8S105K6
- 16 MHz advanced STM8 core
- 32 Kbyte Flash
- 1 Kbyte EEPROM
- 2 Kbyte RAM
- 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
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 STM8S208
4 Toolchain
4.1 STM8Tools
- https://github.com/tenbaht/sduino/releases/download/v0.3.3/sduino-tools_linux32-2017.11.13.tar.bz2
- https://github.com/tenbaht/sduino/releases/download/v0.3.3/sduino-tools_linux64-2017.11.13.tar.bz2
- https://github.com/tenbaht/sduino/releases/download/v0.3.3/sduino-tools_macosx-2017.11.13.tar.bz2
- https://github.com/tenbaht/sduino/releases/download/v0.3.3/sduino-tools_mingw32-2017.11.13.tar.bz2
4.2 SDCC
- https://github.com/tenbaht/sduino/releases/download/v0.3.0/sdcc-stm8-amd64-unknown-linux2.5-20171020-10088.tar.bz2
- https://github.com/tenbaht/sduino/releases/download/v0.3.0/sdcc-stm8-i386-unknown-linux2.5-20171020-10088.tar.bz2
- https://github.com/tenbaht/sduino/releases/download/v0.3.0/sdcc-stm8-i586-mingw32msvc-20171020-10088.tar.bz2
- https://github.com/tenbaht/sduino/releases/download/v0.3.3/sdcc-stm8-universal-apple-macosx-20170720-9960.tar.bz2
4.3 i686-mingw32
- https://github.com/stm32duino/BoardManagerFiles/raw/master/STM8/tools/STM8Tools-0.1.0-windows.tar.bz2
- http://cosmicsoftware.com/Arduino/4.1.3/Cxppstm8.zip
4.4 Github
- https://github.com/tenbaht/sduino
- https://github.com/tenbaht/sduino/raw/master/package_sduino_stm8_index.json
- https://github.com/stm32duino/Arduino_Core_STM8
- https://github.com/stm32duino/BoardManagerFiles/raw/master/STM8/package_stm8_index.json
5 Upload
The STM8 SWIM protocol (STLink) is well documented in UM0470
5.1 Hardware
5.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
5.3 Software
6 Debug
7 Reference
