mikroSDK Reference Manual

This section propose definition to remap the alternate function to some other port/pins. More...

Macros

#define __HAL_AFIO_REMAP_SPI1_ENABLE()   AFIO_REMAP_ENABLE(AFIO_MAPR_SPI1_REMAP)
 Enable the remapping of SPI1 alternate function NSS, SCK, MISO and MOSI.
 
#define __HAL_AFIO_REMAP_SPI1_DISABLE()   AFIO_REMAP_DISABLE(AFIO_MAPR_SPI1_REMAP)
 Disable the remapping of SPI1 alternate function NSS, SCK, MISO and MOSI.
 
#define __HAL_AFIO_REMAP_I2C1_ENABLE()   AFIO_REMAP_ENABLE(AFIO_MAPR_I2C1_REMAP)
 Enable the remapping of I2C1 alternate function SCL and SDA.
 
#define __HAL_AFIO_REMAP_I2C1_DISABLE()   AFIO_REMAP_DISABLE(AFIO_MAPR_I2C1_REMAP)
 Disable the remapping of I2C1 alternate function SCL and SDA.
 
#define __HAL_AFIO_REMAP_USART1_ENABLE()   AFIO_REMAP_ENABLE(AFIO_MAPR_USART1_REMAP)
 Enable the remapping of USART1 alternate function TX and RX.
 
#define __HAL_AFIO_REMAP_USART1_DISABLE()   AFIO_REMAP_DISABLE(AFIO_MAPR_USART1_REMAP)
 Disable the remapping of USART1 alternate function TX and RX.
 
#define __HAL_AFIO_REMAP_USART2_ENABLE()   AFIO_REMAP_ENABLE(AFIO_MAPR_USART2_REMAP)
 Enable the remapping of USART2 alternate function CTS, RTS, CK, TX and RX.
 
#define __HAL_AFIO_REMAP_USART2_DISABLE()   AFIO_REMAP_DISABLE(AFIO_MAPR_USART2_REMAP)
 Disable the remapping of USART2 alternate function CTS, RTS, CK, TX and RX.
 
#define __HAL_AFIO_REMAP_USART3_ENABLE()   AFIO_REMAP_PARTIAL(AFIO_MAPR_USART3_REMAP_FULLREMAP, AFIO_MAPR_USART3_REMAP_FULLREMAP)
 Enable the remapping of USART3 alternate function CTS, RTS, CK, TX and RX.
 
#define __HAL_AFIO_REMAP_USART3_PARTIAL()   AFIO_REMAP_PARTIAL(AFIO_MAPR_USART3_REMAP_PARTIALREMAP, AFIO_MAPR_USART3_REMAP_FULLREMAP)
 Enable the remapping of USART3 alternate function CTS, RTS, CK, TX and RX.
 
#define __HAL_AFIO_REMAP_USART3_DISABLE()   AFIO_REMAP_PARTIAL(AFIO_MAPR_USART3_REMAP_NOREMAP, AFIO_MAPR_USART3_REMAP_FULLREMAP)
 Disable the remapping of USART3 alternate function CTS, RTS, CK, TX and RX.
 
#define __HAL_AFIO_REMAP_TIM1_ENABLE()   AFIO_REMAP_PARTIAL(AFIO_MAPR_TIM1_REMAP_FULLREMAP, AFIO_MAPR_TIM1_REMAP_FULLREMAP)
 Enable the remapping of TIM1 alternate function channels 1 to 4, 1N to 3N, external trigger (ETR) and Break input (BKIN)
 
#define __HAL_AFIO_REMAP_TIM1_PARTIAL()   AFIO_REMAP_PARTIAL(AFIO_MAPR_TIM1_REMAP_PARTIALREMAP, AFIO_MAPR_TIM1_REMAP_FULLREMAP)
 Enable the remapping of TIM1 alternate function channels 1 to 4, 1N to 3N, external trigger (ETR) and Break input (BKIN)
 
#define __HAL_AFIO_REMAP_TIM1_DISABLE()   AFIO_REMAP_PARTIAL(AFIO_MAPR_TIM1_REMAP_NOREMAP, AFIO_MAPR_TIM1_REMAP_FULLREMAP)
 Disable the remapping of TIM1 alternate function channels 1 to 4, 1N to 3N, external trigger (ETR) and Break input (BKIN)
 
#define __HAL_AFIO_REMAP_TIM2_ENABLE()   AFIO_REMAP_PARTIAL(AFIO_MAPR_TIM2_REMAP_FULLREMAP, AFIO_MAPR_TIM2_REMAP_FULLREMAP)
 Enable the remapping of TIM2 alternate function channels 1 to 4 and external trigger (ETR)
 
#define __HAL_AFIO_REMAP_TIM2_PARTIAL_2()   AFIO_REMAP_PARTIAL(AFIO_MAPR_TIM2_REMAP_PARTIALREMAP2, AFIO_MAPR_TIM2_REMAP_FULLREMAP)
 Enable the remapping of TIM2 alternate function channels 1 to 4 and external trigger (ETR)
 
#define __HAL_AFIO_REMAP_TIM2_PARTIAL_1()   AFIO_REMAP_PARTIAL(AFIO_MAPR_TIM2_REMAP_PARTIALREMAP1, AFIO_MAPR_TIM2_REMAP_FULLREMAP)
 Enable the remapping of TIM2 alternate function channels 1 to 4 and external trigger (ETR)
 
#define __HAL_AFIO_REMAP_TIM2_DISABLE()   AFIO_REMAP_PARTIAL(AFIO_MAPR_TIM2_REMAP_NOREMAP, AFIO_MAPR_TIM2_REMAP_FULLREMAP)
 Disable the remapping of TIM2 alternate function channels 1 to 4 and external trigger (ETR)
 
#define __HAL_AFIO_REMAP_TIM3_ENABLE()   AFIO_REMAP_PARTIAL(AFIO_MAPR_TIM3_REMAP_FULLREMAP, AFIO_MAPR_TIM3_REMAP_FULLREMAP)
 Enable the remapping of TIM3 alternate function channels 1 to 4.
 
#define __HAL_AFIO_REMAP_TIM3_PARTIAL()   AFIO_REMAP_PARTIAL(AFIO_MAPR_TIM3_REMAP_PARTIALREMAP, AFIO_MAPR_TIM3_REMAP_FULLREMAP)
 Enable the remapping of TIM3 alternate function channels 1 to 4.
 
#define __HAL_AFIO_REMAP_TIM3_DISABLE()   AFIO_REMAP_PARTIAL(AFIO_MAPR_TIM3_REMAP_NOREMAP, AFIO_MAPR_TIM3_REMAP_FULLREMAP)
 Disable the remapping of TIM3 alternate function channels 1 to 4.
 
#define __HAL_AFIO_REMAP_TIM4_ENABLE()   AFIO_REMAP_ENABLE(AFIO_MAPR_TIM4_REMAP)
 Enable the remapping of TIM4 alternate function channels 1 to 4.
 
#define __HAL_AFIO_REMAP_TIM4_DISABLE()   AFIO_REMAP_DISABLE(AFIO_MAPR_TIM4_REMAP)
 Disable the remapping of TIM4 alternate function channels 1 to 4.
 
#define __HAL_AFIO_REMAP_PD01_ENABLE()   AFIO_REMAP_ENABLE(AFIO_MAPR_PD01_REMAP)
 Enable the remapping of PD0 and PD1. When the HSE oscillator is not used (application running on internal 8 MHz RC) PD0 and PD1 can be mapped on OSC_IN and OSC_OUT. This is available only on 36, 48 and 64 pins packages (PD0 and PD1 are available on 100-pin and 144-pin packages, no need for remapping).
 
#define __HAL_AFIO_REMAP_PD01_DISABLE()   AFIO_REMAP_DISABLE(AFIO_MAPR_PD01_REMAP)
 Disable the remapping of PD0 and PD1. When the HSE oscillator is not used (application running on internal 8 MHz RC) PD0 and PD1 can be mapped on OSC_IN and OSC_OUT. This is available only on 36, 48 and 64 pins packages (PD0 and PD1 are available on 100-pin and 144-pin packages, no need for remapping).
 
#define __HAL_AFIO_REMAP_ADC1_ETRGINJ_ENABLE()   AFIO_REMAP_ENABLE(AFIO_MAPR_ADC1_ETRGINJ_REMAP)
 Enable the remapping of ADC1_ETRGINJ (ADC 1 External trigger injected conversion).
 
#define __HAL_AFIO_REMAP_ADC1_ETRGINJ_DISABLE()   AFIO_REMAP_DISABLE(AFIO_MAPR_ADC1_ETRGINJ_REMAP)
 Disable the remapping of ADC1_ETRGINJ (ADC 1 External trigger injected conversion).
 
#define __HAL_AFIO_REMAP_ADC1_ETRGREG_ENABLE()   AFIO_REMAP_ENABLE(AFIO_MAPR_ADC1_ETRGREG_REMAP)
 Enable the remapping of ADC1_ETRGREG (ADC 1 External trigger regular conversion).
 
#define __HAL_AFIO_REMAP_ADC1_ETRGREG_DISABLE()   AFIO_REMAP_DISABLE(AFIO_MAPR_ADC1_ETRGREG_REMAP)
 Disable the remapping of ADC1_ETRGREG (ADC 1 External trigger regular conversion).
 
#define __HAL_AFIO_REMAP_SWJ_ENABLE()   AFIO_DBGAFR_CONFIG(AFIO_MAPR_SWJ_CFG_RESET)
 Enable the Serial wire JTAG configuration.
 
#define __HAL_AFIO_REMAP_SWJ_NONJTRST()   AFIO_DBGAFR_CONFIG(AFIO_MAPR_SWJ_CFG_NOJNTRST)
 Enable the Serial wire JTAG configuration.
 
#define __HAL_AFIO_REMAP_SWJ_NOJTAG()   AFIO_DBGAFR_CONFIG(AFIO_MAPR_SWJ_CFG_JTAGDISABLE)
 Enable the Serial wire JTAG configuration.
 
#define __HAL_AFIO_REMAP_SWJ_DISABLE()   AFIO_DBGAFR_CONFIG(AFIO_MAPR_SWJ_CFG_DISABLE)
 Disable the Serial wire JTAG configuration.
 

Macro Definition Documentation

◆ __HAL_AFIO_REMAP_ADC1_ETRGINJ_DISABLE

#define __HAL_AFIO_REMAP_ADC1_ETRGINJ_DISABLE ( )    AFIO_REMAP_DISABLE(AFIO_MAPR_ADC1_ETRGINJ_REMAP)
Note
DISABLE: ADC1 External trigger injected conversion is connected to EXTI15
Return values
None

◆ __HAL_AFIO_REMAP_ADC1_ETRGINJ_ENABLE

#define __HAL_AFIO_REMAP_ADC1_ETRGINJ_ENABLE ( )    AFIO_REMAP_ENABLE(AFIO_MAPR_ADC1_ETRGINJ_REMAP)
Note
ENABLE: ADC1 External Event injected conversion is connected to TIM8 Channel4.
Return values
None

◆ __HAL_AFIO_REMAP_ADC1_ETRGREG_DISABLE

#define __HAL_AFIO_REMAP_ADC1_ETRGREG_DISABLE ( )    AFIO_REMAP_DISABLE(AFIO_MAPR_ADC1_ETRGREG_REMAP)
Note
DISABLE: ADC1 External trigger regular conversion is connected to EXTI11
Return values
None

◆ __HAL_AFIO_REMAP_ADC1_ETRGREG_ENABLE

#define __HAL_AFIO_REMAP_ADC1_ETRGREG_ENABLE ( )    AFIO_REMAP_ENABLE(AFIO_MAPR_ADC1_ETRGREG_REMAP)
Note
ENABLE: ADC1 External Event regular conversion is connected to TIM8 TRG0.
Return values
None

◆ __HAL_AFIO_REMAP_I2C1_DISABLE

#define __HAL_AFIO_REMAP_I2C1_DISABLE ( )    AFIO_REMAP_DISABLE(AFIO_MAPR_I2C1_REMAP)
Note
DISABLE: No remap (SCL/PB6, SDA/PB7)
Return values
None

◆ __HAL_AFIO_REMAP_I2C1_ENABLE

#define __HAL_AFIO_REMAP_I2C1_ENABLE ( )    AFIO_REMAP_ENABLE(AFIO_MAPR_I2C1_REMAP)
Note
ENABLE: Remap (SCL/PB8, SDA/PB9)
Return values
None

◆ __HAL_AFIO_REMAP_PD01_DISABLE

#define __HAL_AFIO_REMAP_PD01_DISABLE ( )    AFIO_REMAP_DISABLE(AFIO_MAPR_PD01_REMAP)
Note
DISABLE: No remapping of PD0 and PD1
Return values
None

◆ __HAL_AFIO_REMAP_PD01_ENABLE

#define __HAL_AFIO_REMAP_PD01_ENABLE ( )    AFIO_REMAP_ENABLE(AFIO_MAPR_PD01_REMAP)
Note
ENABLE: PD0 remapped on OSC_IN, PD1 remapped on OSC_OUT.
Return values
None

◆ __HAL_AFIO_REMAP_SPI1_DISABLE

#define __HAL_AFIO_REMAP_SPI1_DISABLE ( )    AFIO_REMAP_DISABLE(AFIO_MAPR_SPI1_REMAP)
Note
DISABLE: No remap (NSS/PA4, SCK/PA5, MISO/PA6, MOSI/PA7)
Return values
None

◆ __HAL_AFIO_REMAP_SPI1_ENABLE

#define __HAL_AFIO_REMAP_SPI1_ENABLE ( )    AFIO_REMAP_ENABLE(AFIO_MAPR_SPI1_REMAP)
Note
ENABLE: Remap (NSS/PA15, SCK/PB3, MISO/PB4, MOSI/PB5)
Return values
None

◆ __HAL_AFIO_REMAP_SWJ_DISABLE

#define __HAL_AFIO_REMAP_SWJ_DISABLE ( )    AFIO_DBGAFR_CONFIG(AFIO_MAPR_SWJ_CFG_DISABLE)
Note
DISABLE: JTAG-DP Disabled and SW-DP Disabled
Return values
None

◆ __HAL_AFIO_REMAP_SWJ_ENABLE

#define __HAL_AFIO_REMAP_SWJ_ENABLE ( )    AFIO_DBGAFR_CONFIG(AFIO_MAPR_SWJ_CFG_RESET)
Note
ENABLE: Full SWJ (JTAG-DP + SW-DP): Reset State
Return values
None

◆ __HAL_AFIO_REMAP_SWJ_NOJTAG

#define __HAL_AFIO_REMAP_SWJ_NOJTAG ( )    AFIO_DBGAFR_CONFIG(AFIO_MAPR_SWJ_CFG_JTAGDISABLE)
Note
NOJTAG: JTAG-DP Disabled and SW-DP Enabled
Return values
None

◆ __HAL_AFIO_REMAP_SWJ_NONJTRST

#define __HAL_AFIO_REMAP_SWJ_NONJTRST ( )    AFIO_DBGAFR_CONFIG(AFIO_MAPR_SWJ_CFG_NOJNTRST)
Note
NONJTRST: Full SWJ (JTAG-DP + SW-DP) but without NJTRST
Return values
None

◆ __HAL_AFIO_REMAP_TIM1_DISABLE

#define __HAL_AFIO_REMAP_TIM1_DISABLE ( )    AFIO_REMAP_PARTIAL(AFIO_MAPR_TIM1_REMAP_NOREMAP, AFIO_MAPR_TIM1_REMAP_FULLREMAP)
Note
DISABLE: No remap (ETR/PA12, CH1/PA8, CH2/PA9, CH3/PA10, CH4/PA11, BKIN/PB12, CH1N/PB13, CH2N/PB14, CH3N/PB15)
Return values
None

◆ __HAL_AFIO_REMAP_TIM1_ENABLE

#define __HAL_AFIO_REMAP_TIM1_ENABLE ( )    AFIO_REMAP_PARTIAL(AFIO_MAPR_TIM1_REMAP_FULLREMAP, AFIO_MAPR_TIM1_REMAP_FULLREMAP)
Note
ENABLE: Full remap (ETR/PE7, CH1/PE9, CH2/PE11, CH3/PE13, CH4/PE14, BKIN/PE15, CH1N/PE8, CH2N/PE10, CH3N/PE12)
Return values
None

◆ __HAL_AFIO_REMAP_TIM1_PARTIAL

#define __HAL_AFIO_REMAP_TIM1_PARTIAL ( )    AFIO_REMAP_PARTIAL(AFIO_MAPR_TIM1_REMAP_PARTIALREMAP, AFIO_MAPR_TIM1_REMAP_FULLREMAP)
Note
PARTIAL: Partial remap (ETR/PA12, CH1/PA8, CH2/PA9, CH3/PA10, CH4/PA11, BKIN/PA6, CH1N/PA7, CH2N/PB0, CH3N/PB1)
Return values
None

◆ __HAL_AFIO_REMAP_TIM2_DISABLE

#define __HAL_AFIO_REMAP_TIM2_DISABLE ( )    AFIO_REMAP_PARTIAL(AFIO_MAPR_TIM2_REMAP_NOREMAP, AFIO_MAPR_TIM2_REMAP_FULLREMAP)
Note
DISABLE: No remap (CH1/ETR/PA0, CH2/PA1, CH3/PA2, CH4/PA3)
Return values
None

◆ __HAL_AFIO_REMAP_TIM2_ENABLE

#define __HAL_AFIO_REMAP_TIM2_ENABLE ( )    AFIO_REMAP_PARTIAL(AFIO_MAPR_TIM2_REMAP_FULLREMAP, AFIO_MAPR_TIM2_REMAP_FULLREMAP)
Note
ENABLE: Full remap (CH1/ETR/PA15, CH2/PB3, CH3/PB10, CH4/PB11)
Return values
None

◆ __HAL_AFIO_REMAP_TIM2_PARTIAL_1

#define __HAL_AFIO_REMAP_TIM2_PARTIAL_1 ( )    AFIO_REMAP_PARTIAL(AFIO_MAPR_TIM2_REMAP_PARTIALREMAP1, AFIO_MAPR_TIM2_REMAP_FULLREMAP)
Note
PARTIAL_1: Partial remap (CH1/ETR/PA15, CH2/PB3, CH3/PA2, CH4/PA3)
Return values
None

◆ __HAL_AFIO_REMAP_TIM2_PARTIAL_2

#define __HAL_AFIO_REMAP_TIM2_PARTIAL_2 ( )    AFIO_REMAP_PARTIAL(AFIO_MAPR_TIM2_REMAP_PARTIALREMAP2, AFIO_MAPR_TIM2_REMAP_FULLREMAP)
Note
PARTIAL_2: Partial remap (CH1/ETR/PA0, CH2/PA1, CH3/PB10, CH4/PB11)
Return values
None

◆ __HAL_AFIO_REMAP_TIM3_DISABLE

#define __HAL_AFIO_REMAP_TIM3_DISABLE ( )    AFIO_REMAP_PARTIAL(AFIO_MAPR_TIM3_REMAP_NOREMAP, AFIO_MAPR_TIM3_REMAP_FULLREMAP)
Note
DISABLE: No remap (CH1/PA6, CH2/PA7, CH3/PB0, CH4/PB1)
TIM3_ETR on PE0 is not re-mapped.
Return values
None

◆ __HAL_AFIO_REMAP_TIM3_ENABLE

#define __HAL_AFIO_REMAP_TIM3_ENABLE ( )    AFIO_REMAP_PARTIAL(AFIO_MAPR_TIM3_REMAP_FULLREMAP, AFIO_MAPR_TIM3_REMAP_FULLREMAP)
Note
ENABLE: Full remap (CH1/PC6, CH2/PC7, CH3/PC8, CH4/PC9)
TIM3_ETR on PE0 is not re-mapped.
Return values
None

◆ __HAL_AFIO_REMAP_TIM3_PARTIAL

#define __HAL_AFIO_REMAP_TIM3_PARTIAL ( )    AFIO_REMAP_PARTIAL(AFIO_MAPR_TIM3_REMAP_PARTIALREMAP, AFIO_MAPR_TIM3_REMAP_FULLREMAP)
Note
PARTIAL: Partial remap (CH1/PB4, CH2/PB5, CH3/PB0, CH4/PB1)
TIM3_ETR on PE0 is not re-mapped.
Return values
None

◆ __HAL_AFIO_REMAP_TIM4_DISABLE

#define __HAL_AFIO_REMAP_TIM4_DISABLE ( )    AFIO_REMAP_DISABLE(AFIO_MAPR_TIM4_REMAP)
Note
DISABLE: No remap (TIM4_CH1/PB6, TIM4_CH2/PB7, TIM4_CH3/PB8, TIM4_CH4/PB9)
TIM4_ETR on PE0 is not re-mapped.
Return values
None

◆ __HAL_AFIO_REMAP_TIM4_ENABLE

#define __HAL_AFIO_REMAP_TIM4_ENABLE ( )    AFIO_REMAP_ENABLE(AFIO_MAPR_TIM4_REMAP)
Note
ENABLE: Full remap (TIM4_CH1/PD12, TIM4_CH2/PD13, TIM4_CH3/PD14, TIM4_CH4/PD15)
TIM4_ETR on PE0 is not re-mapped.
Return values
None

◆ __HAL_AFIO_REMAP_USART1_DISABLE

#define __HAL_AFIO_REMAP_USART1_DISABLE ( )    AFIO_REMAP_DISABLE(AFIO_MAPR_USART1_REMAP)
Note
DISABLE: No remap (TX/PA9, RX/PA10)
Return values
None

◆ __HAL_AFIO_REMAP_USART1_ENABLE

#define __HAL_AFIO_REMAP_USART1_ENABLE ( )    AFIO_REMAP_ENABLE(AFIO_MAPR_USART1_REMAP)
Note
ENABLE: Remap (TX/PB6, RX/PB7)
Return values
None

◆ __HAL_AFIO_REMAP_USART2_DISABLE

#define __HAL_AFIO_REMAP_USART2_DISABLE ( )    AFIO_REMAP_DISABLE(AFIO_MAPR_USART2_REMAP)
Note
DISABLE: No remap (CTS/PA0, RTS/PA1, TX/PA2, RX/PA3, CK/PA4)
Return values
None

◆ __HAL_AFIO_REMAP_USART2_ENABLE

#define __HAL_AFIO_REMAP_USART2_ENABLE ( )    AFIO_REMAP_ENABLE(AFIO_MAPR_USART2_REMAP)
Note
ENABLE: Remap (CTS/PD3, RTS/PD4, TX/PD5, RX/PD6, CK/PD7)
Return values
None

◆ __HAL_AFIO_REMAP_USART3_DISABLE

#define __HAL_AFIO_REMAP_USART3_DISABLE ( )    AFIO_REMAP_PARTIAL(AFIO_MAPR_USART3_REMAP_NOREMAP, AFIO_MAPR_USART3_REMAP_FULLREMAP)
Note
DISABLE: No remap (TX/PB10, RX/PB11, CK/PB12, CTS/PB13, RTS/PB14)
Return values
None

◆ __HAL_AFIO_REMAP_USART3_ENABLE

#define __HAL_AFIO_REMAP_USART3_ENABLE ( )    AFIO_REMAP_PARTIAL(AFIO_MAPR_USART3_REMAP_FULLREMAP, AFIO_MAPR_USART3_REMAP_FULLREMAP)
Note
ENABLE: Full remap (TX/PD8, RX/PD9, CK/PD10, CTS/PD11, RTS/PD12)
Return values
None

◆ __HAL_AFIO_REMAP_USART3_PARTIAL

#define __HAL_AFIO_REMAP_USART3_PARTIAL ( )    AFIO_REMAP_PARTIAL(AFIO_MAPR_USART3_REMAP_PARTIALREMAP, AFIO_MAPR_USART3_REMAP_FULLREMAP)
Note
PARTIAL: Partial remap (TX/PC10, RX/PC11, CK/PC12, CTS/PB13, RTS/PB14)
Return values
None