STM8L15x Standard Peripherals Drivers: SYSCFG configuration

STM8L15x/16x Standard Peripherals Drivers

STM8L15x Standard Peripherals Drivers

SYSCFG configuration

SYSCFG configuration. More...

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.

Detailed Description

SYSCFG configuration.

 ===============================================================================
                           SYSCFG configuration functions
 ===============================================================================  
  
       ===================================================================      
                        SYSCFG Driver: how to use it for remapping
       =================================================================== 
       
         1. To remap the alternate function of some peripherals (such as: USART,
            SPI, TIMs...), use SYSCFG_REMAPPinConfig()
          
         2. To remap the DMA channels of ADC1 and TIM4, use SYSCFG_REMAPDMAChannelConfig()


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.

STM8S Firmware Library: Overview

 

 

 

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