STM8S/A Standard Peripherals Firmware Library
|
Functions | |
static void | CLK_Config (void) |
Configure system clock to run at 16Mhz. | |
static void | GPIO_Config (void) |
Initialize LED1 and Key Button mounted on the evaluation board. | |
INTERRUPT_HANDLER (TLI_IRQHandler, 0) | |
Top Level Interrupt routine. | |
INTERRUPT_HANDLER (AWU_IRQHandler, 1) | |
Auto Wake Up Interrupt routine. | |
INTERRUPT_HANDLER (CLK_IRQHandler, 2) | |
Clock Controller Interrupt routine. | |
INTERRUPT_HANDLER (EXTI_PORTA_IRQHandler, 3) | |
External Interrupt PORTA Interrupt routine. | |
INTERRUPT_HANDLER (EXTI_PORTB_IRQHandler, 4) | |
External Interrupt PORTB Interrupt routine. | |
INTERRUPT_HANDLER (EXTI_PORTC_IRQHandler, 5) | |
External Interrupt PORTC Interrupt routine. | |
INTERRUPT_HANDLER (EXTI_PORTD_IRQHandler, 6) | |
External Interrupt PORTD Interrupt routine. | |
INTERRUPT_HANDLER (EXTI_PORTE_IRQHandler, 7) | |
External Interrupt PORTE Interrupt routine. | |
INTERRUPT_HANDLER (SPI_IRQHandler, 10) | |
SPI Interrupt routine. | |
INTERRUPT_HANDLER (TIM1_UPD_OVF_TRG_BRK_IRQHandler, 11) | |
Timer1 Update/Overflow/Trigger/Break Interrupt routine. | |
INTERRUPT_HANDLER (TIM1_CAP_COM_IRQHandler, 12) | |
Timer1 Capture/Compare Interrupt routine. | |
INTERRUPT_HANDLER (TIM2_UPD_OVF_BRK_IRQHandler, 13) | |
Timer2 Update/Overflow/Break Interrupt routine. | |
INTERRUPT_HANDLER (TIM2_CAP_COM_IRQHandler, 14) | |
Timer2 Capture/Compare Interrupt routine. | |
INTERRUPT_HANDLER (I2C_IRQHandler, 19) | |
I2C Interrupt routine. | |
INTERRUPT_HANDLER (ADC1_IRQHandler, 22) | |
ADC1 interrupt routine. | |
INTERRUPT_HANDLER (TIM4_UPD_OVF_IRQHandler, 23) | |
Timer4 Update/Overflow Interrupt routine. | |
INTERRUPT_HANDLER (EEPROM_EEC_IRQHandler, 24) | |
Eeprom EEC Interrupt routine. | |
INTERRUPT_HANDLER_TRAP (TRAP_IRQHandler) | |
TRAP interrupt routine. | |
static void | IWDG_Config (void) |
Configures the IWDG to generate a Reset if it is not refreshed at the correct time. | |
static uint32_t | LSIMeasurment (void) |
Measure the LSI frequency using timer IC1 and update the calibration registers. | |
void | main (void) |
Main program. | |
Variables | |
__IO uint32_t | LsiFreq = 0 |
Function Documentation
static void CLK_Config | ( | void | ) | [static] |
Configure system clock to run at 16Mhz.
- Parameters:
-
None
- Return values:
-
None
static void GPIO_Config | ( | void | ) | [static] |
Initialize LED1 and Key Button mounted on the evaluation board.
- Parameters:
-
None
- Return values:
-
None
INTERRUPT_HANDLER | ( | TLI_IRQHandler | , |
0 | |||
) |
Top Level Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 72 of file STM8S_StdPeriph_Examples/IWDG/IWDG_Example/stm8s_it.c.
INTERRUPT_HANDLER | ( | AWU_IRQHandler | , |
1 | |||
) |
Auto Wake Up Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 84 of file STM8S_StdPeriph_Examples/IWDG/IWDG_Example/stm8s_it.c.
INTERRUPT_HANDLER | ( | CLK_IRQHandler | , |
2 | |||
) |
Clock Controller Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 96 of file STM8S_StdPeriph_Examples/IWDG/IWDG_Example/stm8s_it.c.
INTERRUPT_HANDLER | ( | EXTI_PORTA_IRQHandler | , |
3 | |||
) |
External Interrupt PORTA Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 108 of file STM8S_StdPeriph_Examples/IWDG/IWDG_Example/stm8s_it.c.
INTERRUPT_HANDLER | ( | EXTI_PORTB_IRQHandler | , |
4 | |||
) |
External Interrupt PORTB Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 120 of file STM8S_StdPeriph_Examples/IWDG/IWDG_Example/stm8s_it.c.
INTERRUPT_HANDLER | ( | EXTI_PORTC_IRQHandler | , |
5 | |||
) |
External Interrupt PORTC Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 132 of file STM8S_StdPeriph_Examples/IWDG/IWDG_Example/stm8s_it.c.
References trap.
INTERRUPT_HANDLER | ( | EXTI_PORTD_IRQHandler | , |
6 | |||
) |
External Interrupt PORTD Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 142 of file STM8S_StdPeriph_Examples/IWDG/IWDG_Example/stm8s_it.c.
INTERRUPT_HANDLER | ( | EXTI_PORTE_IRQHandler | , |
7 | |||
) |
External Interrupt PORTE Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 154 of file STM8S_StdPeriph_Examples/IWDG/IWDG_Example/stm8s_it.c.
INTERRUPT_HANDLER | ( | SPI_IRQHandler | , |
10 | |||
) |
SPI Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 205 of file STM8S_StdPeriph_Examples/IWDG/IWDG_Example/stm8s_it.c.
INTERRUPT_HANDLER | ( | TIM1_UPD_OVF_TRG_BRK_IRQHandler | , |
11 | |||
) |
Timer1 Update/Overflow/Trigger/Break Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 217 of file STM8S_StdPeriph_Examples/IWDG/IWDG_Example/stm8s_it.c.
INTERRUPT_HANDLER | ( | TIM1_CAP_COM_IRQHandler | , |
12 | |||
) |
Timer1 Capture/Compare Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 229 of file STM8S_StdPeriph_Examples/IWDG/IWDG_Example/stm8s_it.c.
INTERRUPT_HANDLER | ( | TIM2_UPD_OVF_BRK_IRQHandler | , |
13 | |||
) |
Timer2 Update/Overflow/Break Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 266 of file STM8S_StdPeriph_Examples/IWDG/IWDG_Example/stm8s_it.c.
INTERRUPT_HANDLER | ( | TIM2_CAP_COM_IRQHandler | , |
14 | |||
) |
Timer2 Capture/Compare Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 278 of file STM8S_StdPeriph_Examples/IWDG/IWDG_Example/stm8s_it.c.
INTERRUPT_HANDLER | ( | I2C_IRQHandler | , |
19 | |||
) |
I2C Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 345 of file STM8S_StdPeriph_Examples/IWDG/IWDG_Example/stm8s_it.c.
INTERRUPT_HANDLER | ( | ADC1_IRQHandler | , |
22 | |||
) |
ADC1 interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 425 of file STM8S_StdPeriph_Examples/IWDG/IWDG_Example/stm8s_it.c.
INTERRUPT_HANDLER | ( | TIM4_UPD_OVF_IRQHandler | , |
23 | |||
) |
Timer4 Update/Overflow Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 454 of file STM8S_StdPeriph_Examples/IWDG/IWDG_Example/stm8s_it.c.
INTERRUPT_HANDLER | ( | EEPROM_EEC_IRQHandler | , |
24 | |||
) |
Eeprom EEC Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 467 of file STM8S_StdPeriph_Examples/IWDG/IWDG_Example/stm8s_it.c.
INTERRUPT_HANDLER_TRAP | ( | TRAP_IRQHandler | ) |
TRAP interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 61 of file STM8S_StdPeriph_Examples/IWDG/IWDG_Example/stm8s_it.c.
static void IWDG_Config | ( | void | ) | [static] |
Configures the IWDG to generate a Reset if it is not refreshed at the correct time.
- Parameters:
-
None
- Return values:
-
None
Definition at line 110 of file STM8S_StdPeriph_Examples/IWDG/IWDG_Example/main.c.
References IWDG_Enable(), IWDG_Prescaler_128, IWDG_ReloadCounter(), IWDG_SetPrescaler(), IWDG_SetReload(), IWDG_WriteAccess_Enable, IWDG_WriteAccessCmd(), and LsiFreq.
Referenced by main().
static uint32_t LSIMeasurment | ( | void | ) | [static] |
Measure the LSI frequency using timer IC1 and update the calibration registers.
- Note:
- It is recommended to use a timer clock frequency of at least 10MHz in order to obtain a better in the LSI frequency measurement.
- Parameters:
-
None
- Return values:
-
None
void main | ( | void | ) |
Main program.
- Parameters:
-
None
- Return values:
-
None
Definition at line 54 of file STM8S_StdPeriph_Examples/IWDG/IWDG_Example/main.c.
References CLK_Config(), GPIO_Config(), IWDG_Config(), IWDG_ReloadCounter(), LED1, LsiFreq, LSIMeasurment(), RESET, RST_ClearFlag(), RST_FLAG_IWDGF, RST_GetFlagStatus(), STM_EVAL_LEDOff(), and STM_EVAL_LEDOn().
Variable Documentation
Definition at line 41 of file STM8S_StdPeriph_Examples/IWDG/IWDG_Example/main.c.
Referenced by IWDG_Config(), and main().