STM8L15x Standard Peripherals Drivers: SYSCFG

STM8L15x/16x Standard Peripherals Drivers

STM8L15x Standard Peripherals Drivers

SYSCFG driver modules. More...

Modules

 SYSCFG_Exported_Types
 SYSCFG_Exported_Macros
 SYSCFG_Private_Functions

Functions

void SYSCFG_REMAPDeInit (void)
 Deinitializes the Remapping registers to their default reset values.
void SYSCFG_REMAPDMAChannelConfig (REMAP_DMAChannel_TypeDef REMAP_DMAChannel)
 Remaps the DMA Channel to the specific peripheral (ADC or TIM4)
void SYSCFG_REMAPPinConfig (REMAP_Pin_TypeDef REMAP_Pin, FunctionalState NewState)
 Changes the mapping of the specified pins.
void SYSCFG_RIAnalogSwitchConfig (RI_AnalogSwitch_TypeDef RI_AnalogSwitch, FunctionalState NewState)
 Enables or disables the Routing Interface Analog switch.
void SYSCFG_RIDeInit (void)
 Deinitializes the RI registers to their default reset values.
void SYSCFG_RIIOSwitchConfig (RI_IOSwitch_TypeDef RI_IOSwitch, FunctionalState NewState)
 Closes or Opens the routing interface Input Output switches.
void SYSCFG_RIResistorConfig (RI_Resistor_TypeDef RI_Resistor, FunctionalState NewState)
 Configures the Pull-up and Pull-down Resistors.
void SYSCFG_RITIMInputCaptureConfig (RI_InputCapture_TypeDef RI_InputCapture, RI_InputCaptureRouting_TypeDef RI_InputCaptureRouting)
 Configures the routing interface to select which Input Output pin to be routed to TIM1 Input Capture.

Detailed Description

SYSCFG driver modules.


Function Documentation

void SYSCFG_REMAPDeInit ( void  )

Deinitializes the Remapping registers to their default reset values.

Parameters:
None
Return values:
None

< Set RMPCR1 to reset value

< Set RMPCR2 to reset value

< Set RMPCR3 to reset value

Definition at line 361 of file stm8l15x_syscfg.c.

References SYSCFG, SYSCFG_RMPCR1_RESET_VALUE, SYSCFG_RMPCR2_RESET_VALUE, and SYSCFG_RMPCR3_RESET_VALUE.

void SYSCFG_REMAPDMAChannelConfig ( REMAP_DMAChannel_TypeDef  REMAP_DMAChannel)

Remaps the DMA Channel to the specific peripheral (ADC or TIM4)

Parameters:
REMAP_DMAChannel,:specifies the DMA Channel to remap. This parameter can be one of the following values:
  • REMAP_DMA1Channel_ADC1ToChannel0: ADC1 DMA1 req/ack mapped on DMA1 channel 0
  • REMAP_DMA1Channel_ADC1ToChannel1: ADC1 DMA1 req/ack mapped on DMA1 channel 1
  • REMAP_DMA1Channel_ADC1ToChannel2: ADC1 DMA1 req/ack mapped on DMA1 channel 2
  • REMAP_DMA1Channel_ADC1ToChannel3: ADC1 DMA1 req/ack mapped on DMA1 channel 3
  • REMAP_DMA1Channel_TIM4ToChannel0: TIM4 DMA1 req/ack mapped on DMA1 channel 0
  • REMAP_DMA1Channel_TIM4ToChannel1: TIM4 DMA1 req/ack mapped on DMA1 channel 1
  • REMAP_DMA1Channel_TIM4ToChannel2: TIM4 DMA1 req/ack mapped on DMA1 channel 2
  • REMAP_DMA1Channel_TIM4ToChannel3: TIM4 DMA1 req/ack mapped on DMA1 channel 3
Return values:
None

Definition at line 463 of file stm8l15x_syscfg.c.

References IS_REMAP_DMACHANNEL, RESET, SYSCFG, SYSCFG_RMPCR1_ADC1DMA_REMAP, and SYSCFG_RMPCR1_TIM4DMA_REMAP.

void SYSCFG_REMAPPinConfig ( REMAP_Pin_TypeDef  REMAP_Pin,
FunctionalState  NewState 
)

Changes the mapping of the specified pins.

Parameters:
REMAP_Pin,:selects the pin to remap. This parameter can be one of the following values:
  • REMAP_Pin_USART1TxRxPortA: USART1 Tx- Rx (PC3- PC2) remapping to PA2- PA3
  • REMAP_Pin_USART1TxRxPortC: USART1 Tx- Rx (PC3- PC2) remapping to PC5- PC6
  • REMAP_Pin_USART1Clk: USART1 CK (PC4) remapping to PA0
  • REMAP_Pin_SPI1Full: SPI1 MISO- MOSI- SCK- NSS(PB7- PB6- PB5- PB4) remapping to PA2- PA3- PC6- PC5
  • REMAP_Pin_ADC1ExtTRIG1: ADC1 External Trigger 1 (PA6) remapping to PD0
  • REMAP_Pin_TIM2TRIGPortA: TIM2 Trigger (PB3) remapping to PA4
  • REMAP_Pin_TIM3TRIGPortA: TIM3 Trigger (PD1) remapping to PA5
  • REMAP_Pin_TIM2TRIGLSE: TIM2 Trigger remapping to LSE
  • REMAP_Pin_TIM3TRIGLSE: TIM3 Trigger remapping to LSE
  • REMAP_Pin_SPI2Full: SPI2 MISO- MOSI- SCK- NSS(PG7- PG6- PG5- PG4) remapping to PI3- PI2- PI1- PI0
  • REMAP_Pin_TIM3TRIGPortG: TIM3 Trigger (PD1) remapping to PG3
  • REMAP_Pin_TIM23BKIN: TIM2 Break Input (PA4) remapping to PG0 and TIM3 Break Input (PA5) remapping to PG1
  • REMAP_Pin_SPI1PortF: SPI1 MISO- MOSI- SCK- NSS(PB7- PB6- PB5- PB4) remapping to PF0- PF1- PF2- PF3
  • REMAP_Pin_USART3TxRxPortF: USART3 Tx- Rx (PG1- PG0) remapping to PF0- PF1
  • REMAP_Pin_USART3Clk: USART3 CK (PG2) remapping to PF2
  • REMAP_Pin_TIM3Channel1: TIM3 Channel 1 (PB1) remapping to PI0
  • REMAP_Pin_TIM3Channel2: TIM3 Channel 2 (PD0) remapping to PI3
  • REMAP_Pin_CCO: CCO (PC4) remapping to PE2
  • REMAP_Pin_TIM2Channel1: TIM2 Channel 1 (PB0) remapping to PC5
  • REMAP_Pin_TIM2Channel2: TIM2 Channel 2 (PB2) remapping to PC6
NewState,:This parameter can be ENABLE or DISABLE.
Return values:
None

Definition at line 404 of file stm8l15x_syscfg.c.

References DISABLE, IS_FUNCTIONAL_STATE, IS_REMAP_PIN, and SYSCFG.

void SYSCFG_RIAnalogSwitchConfig ( RI_AnalogSwitch_TypeDef  RI_AnalogSwitch,
FunctionalState  NewState 
)

Enables or disables the Routing Interface Analog switch.

Parameters:
RI_AnalogSwitch,:Analog Switch This parameter can be one of the following values:
  • RI_AnalogSwitch_0: Analog switch 0
  • RI_AnalogSwitch_1: Analog switch 1
  • RI_AnalogSwitch_2: Analog switch 2
  • RI_AnalogSwitch_3: Analog switch 3
  • RI_AnalogSwitch_4: Analog switch 4
  • RI_AnalogSwitch_5: Analog switch 5
  • RI_AnalogSwitch_6: Analog switch 6
  • RI_AnalogSwitch_7: Analog switch 7
  • RI_AnalogSwitch_8: Analog switch 8
  • RI_AnalogSwitch_9: Analog switch 9
  • RI_AnalogSwitch_10: Analog switch 10
  • RI_AnalogSwitch_11: Analog switch 11
  • RI_AnalogSwitch_12: Analog switch 14
NewState,:new state of the analog switch. This parameter can be ENABLE or DISABLE.
Return values:
None

Definition at line 177 of file stm8l15x_syscfg.c.

References DISABLE, IS_FUNCTIONAL_STATE, IS_RI_ANALOGSWITCH, and RI.

void SYSCFG_RIDeInit ( void  )

Deinitializes the RI registers to their default reset values.

Parameters:
None
Return values:
None

< Set RI->ICR1 to reset value

< Set RI->ICR2 to reset value

< Set RI->IOSR1 to reset value

< Set RI->IOSR2 to reset value

< Set RI->IOSR3 to reset value

< Set RI->IOSR3 to reset value

< Set RI->ASCR1 to reset value

< Set RI->ASCR2 to reset value

< Set RI->RCR to reset value

Definition at line 112 of file stm8l15x_syscfg.c.

References RI, RI_ASCR1_RESET_VALUE, RI_ASCR2_RESET_VALUE, RI_ICR1_RESET_VALUE, RI_ICR2_RESET_VALUE, RI_IOSR1_RESET_VALUE, RI_IOSR2_RESET_VALUE, RI_IOSR3_RESET_VALUE, RI_IOSR4_RESET_VALUE, and RI_RCR_RESET_VALUE.

void SYSCFG_RIIOSwitchConfig ( RI_IOSwitch_TypeDef  RI_IOSwitch,
FunctionalState  NewState 
)

Closes or Opens the routing interface Input Output switches.

Parameters:
RI_IOSwitch,:can be one of RI_IOSwitch_1..RI_IOSwitch_24
NewState,:new state of the Input Output Switch. This parameter can be ENABLE or DISABLE.
Return values:
None.

Definition at line 227 of file stm8l15x_syscfg.c.

References DISABLE, IS_FUNCTIONAL_STATE, IS_RI_IOSWITCH, and RI.

void SYSCFG_RIResistorConfig ( RI_Resistor_TypeDef  RI_Resistor,
FunctionalState  NewState 
)

Configures the Pull-up and Pull-down Resistors.

Parameters:
RI_Resistor,:selects the resistor to connect, This parameter can be one of the following values:
  • RI_Resistor_10KPU: 10K pull up
  • RI_Resistor_400KPU: 400K pull up
  • RI_Resistor_10KPD: 10K pull down
  • RI_Resistor_400KPD: 400K pull down
Return values:
None

Definition at line 313 of file stm8l15x_syscfg.c.

References DISABLE, IS_FUNCTIONAL_STATE, IS_RI_RESISTOR, and RI.

void SYSCFG_RITIMInputCaptureConfig ( RI_InputCapture_TypeDef  RI_InputCapture,
RI_InputCaptureRouting_TypeDef  RI_InputCaptureRouting 
)

Configures the routing interface to select which Input Output pin to be routed to TIM1 Input Capture.

Parameters:
RI_InputCapture,:selects the TIM1 input capture2 RI_InputCapture_IC2 or the TIM1 input capture3 RI_InputCapture_IC3
RI_InputCaptureRouting,:selects the value to set in TIM1 Input Capture routing register ICRx and can be from RI_InputCaptureRouting_0 to RI_InputCaptureRouting_22.
Return values:
None.

Definition at line 135 of file stm8l15x_syscfg.c.

References IS_RI_INPUTCAPTURE, IS_RI_INPUTCAPTUREROUTING, RI, and RI_InputCapture_IC2.

STM8S Firmware Library: Overview

 

 

 

For complete documentation on STM8L15x 8-bit microcontrollers platform visit www.st.com