Home
STMicroelectronics
Microcontrollers
STM8
STMicroelectronics STM8 User Manual
4
of 1
of 1 rating
126 pages
Give review
Manual
Specs
To Next Page
To Next Page
To Previous Page
To Previous Page
Loading...
{
seg = 1;
}
TIM4_ClearFlag(TIM4_FLAG_UPDATE);
}
stm8_interrupt_vect
or.c
#include "stm8s_it.h"
typedef void @far (*interrupt_handler_t)(void);
struct interrupt_vector {
unsigned char interrupt_instruction;
interrupt_handler_t interrupt_handler;
};
//@far @interrupt void NonHandledInterrupt (void)
//{
/* in order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction
*/
//return;
//}
extern void _stext(); /* startup routine */
struct interrupt_vector const _vectab[] = {
{0x82, (interrupt_handler_t)_stext}, /* reset */
{0x82, NonHandledInterrupt}, /* trap */
{0x82, NonHandledInterrupt}, /* irq0 */
{0x82, NonHandledInterrupt}, /* irq1 */
{0x82, NonHandledInterrupt}, /* irq2 */
{0x82, NonHandledInterrupt}, /* irq3 */
{0x82, NonHandledInterrupt}, /* irq4 */
{0x82, NonHandledInterrupt}, /* irq5 */
{0x82, NonHandledInterrupt}, /* irq6 */
{0x82, NonHandledInterrupt}, /* irq7 */
{0x82, NonHandledInterrupt}, /* irq8 */
{0x82, NonHandledInterrupt}, /* irq9 */
{0x82, NonHandledInterrupt}, /* irq10 */
{0x82, NonHandledInterrupt}, /* irq11 */
{0x82, NonHandledInterrupt}, /* irq12 */
{0x82, NonHandledInterrupt}, /* irq13 */
{0x82, NonHandledInterrupt}, /* irq14 */
{0x82, NonHandledInterrupt}, /* irq15 */
{0x82, NonHandledInterrupt}, /* irq16 */
{0x82, NonHandledInterrupt}, /* irq17 */
{0x82, NonHandledInterrupt}, /* irq18 */
{0x82, NonHandledInterrupt}, /* irq19 */
{0x82, NonHandledInterrupt}, /* irq20 */
{0x82, NonHandledInterrupt}, /* irq21 */
{0x82, NonHandledInterrupt}, /* irq22 */
{0x82, (interrupt_handler_t)TIM4_UPD_IRQHandler}, /* irq23 */
{0x82, NonHandledInterrupt}, /* irq24 */
{0x82, NonHandledInterrupt}, /* irq25 */
{0x82, NonHandledInterrupt}, /* irq26 */
{0x82, NonHandledInterrupt}, /* irq27 */
{0x82, NonHandledInterrupt}, /* irq28 */
{0x82, NonHandledInterrupt}, /* irq29 */
};
78
80
Table of Contents
Starting STM8 Microcontrollers
1
The STM8 Family
2
Overview of the Discovery Board
3
Hardware Tools
5
Software Tools
7
Stm8Cubemx
11
Preparing the Software Tools
12
Creating a New Code Project
14
Uploading Code
20
General Purpose Input Output (GPIO)
24
Functions
26
Hardware Connection
27
Code Example
27
Explanation
28
Demo
29
Video Link
29
Clock System (CLK)
30
External Interrupt (EXTI)
34
Stm8_Interrupt_Vector.C
38
Stm8S_It.h
39
Stm8S_It.C
39
Beeper (BEEP)
41
Alphanumerical LCD
44
Analog-To-Digital Converter (ADC)
51
Analog Watchdog (AWD)
56
Independent Watchdog (IWDG)
62
Window Watchdog (WWDG)
67
Video Link
70
Timer Overview
71
Time Base Generation (TIM2)
72
Timer Interrupt (TIM4)
76
General Purpose Pulse Width Modulation (TIM2 PWM)
82
Advanced Pulse Width Modulation (TIM1 PWM)
86
Timer Input Capture (TIM1 & TIM2)
91
Stm8_Interrupt_Vector.C (Interrupt Vector Address Part Only)
94
Stm8S_It.h (Top Part Only)
94
Stm8S_It.C (Top Part Only)
94
Communication Overview
98
Serial Communication (UART)
99
Video Link
103
Serial Peripheral Interface (SPI)
104
Inter-Integrated Circuit (I2C)
111
Some Useful Tips
119
Creation & Addition of Libraries
119
Peripheral Clock Configurations
121
Configuring Similar Stuffs Quickly
122
Some Stuffs about Cosmic C and SPL
122
Unlocking a Locked STM8 Chip
124
Mastering C Language
125
Epilogue
126
4
Based on 1 rating
Ask a question
Give review
Questions and Answers:
Need help?
Do you have a question about the STMicroelectronics STM8 and is the answer not in the manual?
Ask a question
STMicroelectronics STM8 Specifications
General
Brand
STMicroelectronics
Model
STM8
Category
Microcontrollers
Language
English
Related product manuals
STMicroelectronics STM32
118 pages
STMicroelectronics STM32F427
36 pages
STMicroelectronics STM32F038C6
103 pages
STM32F05 series
742 pages
STM32WL5 Series
1450 pages
STM32F469I-DISCO
30 pages