PRS - Peripheral Reflex System#

Peripheral Reflex System (PRS) Peripheral API.

This module contains functions to control the PRS peripheral of Silicon Labs 32-bit MCUs and SoCs. The PRS allows configurable, fast, and autonomous communication between peripherals on the MCU or SoC.

Enumerations#

enum
prsTypeAsync
prsTypeSync
}

PRS Channel type.

enum
prsEdgeOff
prsEdgePos
prsEdgeNeg
prsEdgeBoth
}

Edge detection type.

enum
prsLogic_Zero = _PRS_ASYNC_CH_CTRL_FNSEL_LOGICAL_ZERO
prsLogic_A_NOR_B = _PRS_ASYNC_CH_CTRL_FNSEL_A_NOR_B
prsLogic_NOT_A_AND_B = _PRS_ASYNC_CH_CTRL_FNSEL_NOT_A_AND_B
prsLogic_NOT_A = _PRS_ASYNC_CH_CTRL_FNSEL_NOT_A
prsLogic_A_AND_NOT_B = _PRS_ASYNC_CH_CTRL_FNSEL_A_AND_NOT_B
prsLogic_NOT_B = _PRS_ASYNC_CH_CTRL_FNSEL_NOT_B
prsLogic_A_XOR_B = _PRS_ASYNC_CH_CTRL_FNSEL_A_XOR_B
prsLogic_A_NAND_B = _PRS_ASYNC_CH_CTRL_FNSEL_A_NAND_B
prsLogic_A_AND_B = _PRS_ASYNC_CH_CTRL_FNSEL_A_AND_B
prsLogic_A_XNOR_B = _PRS_ASYNC_CH_CTRL_FNSEL_A_XNOR_B
prsLogic_B = _PRS_ASYNC_CH_CTRL_FNSEL_B
prsLogic_NOT_A_OR_B = _PRS_ASYNC_CH_CTRL_FNSEL_NOT_A_OR_B
prsLogic_A = _PRS_ASYNC_CH_CTRL_FNSEL_A
prsLogic_A_OR_NOT_B = _PRS_ASYNC_CH_CTRL_FNSEL_A_OR_NOT_B
prsLogic_A_OR_B = _PRS_ASYNC_CH_CTRL_FNSEL_A_OR_B
prsLogic_One = _PRS_ASYNC_CH_CTRL_FNSEL_LOGICAL_ONE
}

Logic functions that can be used when combining two PRS channels.

enum
prsSignalNone = PRS_SYNC_CH_CTRL_SOURCESEL_DEFAULT | (0x0 << _PRS_SYNC_CH_CTRL_SIGSEL_SHIFT)
prsSignalSW = PRS_SYNC_CH_CTRL_SOURCESEL_DEFAULT | (0x1 << _PRS_SYNC_CH_CTRL_SIGSEL_SHIFT)
prsSignalTIMER0_UF = PRS_TIMER0_UF
prsSignalTIMER0_OF = PRS_TIMER0_OF
prsSignalTIMER0_CC0 = PRS_TIMER0_CC0
prsSignalTIMER0_CC1 = PRS_TIMER0_CC1
prsSignalTIMER0_CC2 = PRS_TIMER0_CC2
prsSignalTIMER1_UF = PRS_TIMER1_UF
prsSignalTIMER1_OF = PRS_TIMER1_OF
prsSignalTIMER1_CC0 = PRS_TIMER1_CC0
prsSignalTIMER1_CC1 = PRS_TIMER1_CC1
prsSignalTIMER1_CC2 = PRS_TIMER1_CC2
prsSignalTIMER2_UF = PRS_TIMER2_UF
prsSignalTIMER2_OF = PRS_TIMER2_OF
prsSignalTIMER2_CC0 = PRS_TIMER2_CC0
prsSignalTIMER2_CC1 = PRS_TIMER2_CC1
prsSignalTIMER2_CC2 = PRS_TIMER2_CC2
prsSignalTIMER3_UF = PRS_TIMER3_UF
prsSignalTIMER3_OF = PRS_TIMER3_OF
prsSignalTIMER3_CC0 = PRS_TIMER3_CC0
prsSignalTIMER3_CC1 = PRS_TIMER3_CC1
prsSignalTIMER3_CC2 = PRS_TIMER3_CC2
prsSignalTIMER4_UF = PRS_TIMER4_UF
prsSignalTIMER4_OF = PRS_TIMER4_OF
prsSignalTIMER4_CC0 = PRS_TIMER4_CC0
prsSignalTIMER4_CC1 = PRS_TIMER4_CC1
prsSignalTIMER4_CC2 = PRS_TIMER4_CC2
prsSignalTIMER5_UF = PRS_TIMER5_UF
prsSignalTIMER5_OF = PRS_TIMER5_OF
prsSignalTIMER5_CC0 = PRS_TIMER5_CC0
prsSignalTIMER5_CC1 = PRS_TIMER5_CC1
prsSignalTIMER5_CC2 = PRS_TIMER5_CC2
prsSignalTIMER6_UF = PRS_TIMER6_UF
prsSignalTIMER6_OF = PRS_TIMER6_OF
prsSignalTIMER6_CC0 = PRS_TIMER6_CC0
prsSignalTIMER6_CC1 = PRS_TIMER6_CC1
prsSignalTIMER6_CC2 = PRS_TIMER6_CC2
prsSignalTIMER7_UF = PRS_TIMER7_UF
prsSignalTIMER7_OF = PRS_TIMER7_OF
prsSignalTIMER7_CC0 = PRS_TIMER7_CC0
prsSignalTIMER7_CC1 = PRS_TIMER7_CC1
prsSignalTIMER7_CC2 = PRS_TIMER7_CC2
prsSignalLETIMER0_CH0 = PRS_LETIMER0_CH0
prsSignalLETIMER0_CH1 = PRS_LETIMER0_CH1
prsSignalPCNT0_UFOF = PRS_PCNT0_UFOF
prsSignalPCNT0_DIR = PRS_PCNT0_DIR
prsSignalCORE_CTIOUT0 = PRS_CORE_CTIOUT0
prsSignalCORE_CTIOUT1 = PRS_CORE_CTIOUT1
prsSignalCORE_CTIOUT2 = PRS_CORE_CTIOUT2
prsSignalCORE_CTIOUT3 = PRS_CORE_CTIOUT3
prsSignalCMUL_CLKOUT0 = PRS_CMUL_CLKOUT0
prsSignalCMUL_CLKOUT1 = PRS_CMUL_CLKOUT1
prsSignalCMUL_CLKOUT2 = PRS_CMUL_CLKOUT2
prsSignalPRSL_ASYNCH0 = PRS_PRSL_ASYNCH0
prsSignalPRSL_ASYNCH1 = PRS_PRSL_ASYNCH1
prsSignalPRSL_ASYNCH2 = PRS_PRSL_ASYNCH2
prsSignalPRSL_ASYNCH3 = PRS_PRSL_ASYNCH3
prsSignalPRSL_ASYNCH4 = PRS_PRSL_ASYNCH4
prsSignalPRSL_ASYNCH5 = PRS_PRSL_ASYNCH5
prsSignalPRSL_ASYNCH6 = PRS_PRSL_ASYNCH6
prsSignalPRSL_ASYNCH7 = PRS_PRSL_ASYNCH7
prsSignalPRS_ASYNCH8 = PRS_PRS_ASYNCH8
prsSignalPRS_ASYNCH9 = PRS_PRS_ASYNCH9
prsSignalPRS_ASYNCH10 = PRS_PRS_ASYNCH10
prsSignalPRS_ASYNCH11 = PRS_PRS_ASYNCH11
prsSignalBURTC_COMP = PRS_BURTC_COMP
prsSignalBURTC_OF = PRS_BURTC_OF
prsSignalSYSRTC0_GRP0OUT0 = PRS_SYSRTC0_GRP0OUT0
prsSignalSYSRTC0_GRP0OUT1 = PRS_SYSRTC0_GRP0OUT1
prsSignalSYSRTC0_GRP1OUT0 = PRS_SYSRTC0_GRP1OUT0
prsSignalSYSRTC0_GRP1OUT1 = PRS_SYSRTC0_GRP1OUT1
prsSignalHFXO0L_STATUS = PRS_HFXO0L_STATUS
prsSignalHFXO0L_STATUS1 = PRS_HFXO0L_STATUS1
prsSignalACMP0_OUT = PRS_ACMP0_OUT
prsSignalACMP1_OUT = PRS_ACMP1_OUT
prsSignalVDAC0_CH0WARM = PRS_VDAC0L_CH0WARM
prsSignalVDAC0_CH1WARM = PRS_VDAC0L_CH1WARM
prsSignalVDAC0_CH0DONE = PRS_VDAC0L_CH0DONEASYNC
prsSignalVDAC0_CH1DONE = PRS_VDAC0L_CH1DONEASYNC
prsSignalVDAC0_INTERNALTIMEROF = PRS_VDAC0L_INTERNALTIMEROF
prsSignalVDAC0_REFRESHTIMEROF = PRS_VDAC0L_REFRESHTIMEROF
prsSignalLESENSE_DECOUT0 = PRS_LESENSE_DECOUT0
prsSignalLESENSE_DECOUT1 = PRS_LESENSE_DECOUT1
prsSignalLESENSE_DECOUT2 = PRS_LESENSE_DECOUT2
prsSignalLESENSE_DECCMP = PRS_LESENSE_DECCMP
prsSignalEUSART0_CS = PRS_EUSART0L_CS
prsSignalEUSART0_IRTX = PRS_EUSART0L_IRDATX
prsSignalEUSART0_RTS = PRS_EUSART0L_RTS
prsSignalEUSART0_RXDATA = PRS_EUSART0L_RXDATAV
prsSignalEUSART0_TX = PRS_EUSART0L_TX
prsSignalEUSART0_TXC = PRS_EUSART0L_TXC
prsSignalEUSART0_RXFL = PRS_EUSART0L_RXFL
prsSignalEUSART0_TXFL = PRS_EUSART0L_TXFL
prsSignalEUSART1_CS = PRS_EUSART1L_CS
prsSignalEUSART1_IRTX = PRS_EUSART1L_IRDATX
prsSignalEUSART1_RTS = PRS_EUSART1L_RTS
prsSignalEUSART1_RXDATA = PRS_EUSART1L_RXDATAV
prsSignalEUSART1_TX = PRS_EUSART1L_TX
prsSignalEUSART1_TXC = PRS_EUSART1L_TXC
prsSignalEUSART1_RXFL = PRS_EUSART1L_RXFL
prsSignalEUSART1_TXFL = PRS_EUSART1L_TXFL
prsSignalEUSART2_CS = PRS_EUSART2L_CS
prsSignalEUSART2_IRTX = PRS_EUSART2L_IRDATX
prsSignalEUSART2_RTS = PRS_EUSART2L_RTS
prsSignalEUSART2_RXDATA = PRS_EUSART2L_RXDATAV
prsSignalEUSART2_TX = PRS_EUSART2L_TX
prsSignalEUSART2_TXC = PRS_EUSART2L_TXC
prsSignalEUSART2_RXFL = PRS_EUSART2L_RXFL
prsSignalEUSART2_TXFL = PRS_EUSART2L_TXFL
prsSignalEUSART3_CS = PRS_EUSART3L_CS
prsSignalEUSART3_IRTX = PRS_EUSART3L_IRDATX
prsSignalEUSART3_RTS = PRS_EUSART3L_RTS
prsSignalEUSART3_RXDATA = PRS_EUSART3L_RXDATAV
prsSignalEUSART3_TX = PRS_EUSART3L_TX
prsSignalEUSART3_TXC = PRS_EUSART3L_TXC
prsSignalEUSART3_RXFL = PRS_EUSART3L_RXFL
prsSignalEUSART3_TXFL = PRS_EUSART3L_TXFL
prsSignalEUSART4_CS = PRS_EUSART4L_CS
prsSignalEUSART4_IRTX = PRS_EUSART4L_IRDATX
prsSignalEUSART4_RTS = PRS_EUSART4L_RTS
prsSignalEUSART4_RXDATA = PRS_EUSART4L_RXDATAV
prsSignalEUSART4_TX = PRS_EUSART4L_TX
prsSignalEUSART4_TXC = PRS_EUSART4L_TXC
prsSignalEUSART4_RXFL = PRS_EUSART4L_RXFL
prsSignalEUSART4_TXFL = PRS_EUSART4L_TXFL
prsSignalIADC0_SCANENTRY = PRS_IADC0_SCANENTRYDONE
prsSignalIADC0_SCANTABLE = PRS_IADC0_SCANTABLEDONE
prsSignalIADC0_SINGLE = PRS_IADC0_SINGLEDONE
prsSignalGPIO_PIN0 = PRS_GPIO_PIN0
prsSignalGPIO_PIN1 = PRS_GPIO_PIN1
prsSignalGPIO_PIN2 = PRS_GPIO_PIN2
prsSignalGPIO_PIN3 = PRS_GPIO_PIN3
prsSignalGPIO_PIN4 = PRS_GPIO_PIN4
prsSignalGPIO_PIN5 = PRS_GPIO_PIN5
prsSignalGPIO_PIN6 = PRS_GPIO_PIN6
prsSignalGPIO_PIN7 = PRS_GPIO_PIN7
prsSignalAGCL_CCA = PRS_AGCL_CCA
prsSignalAGCL_CCAREQ = PRS_AGCL_CCAREQ
prsSignalAGCL_GAINADJUST = PRS_AGCL_GAINADJUST
prsSignalAGCL_GAINOK = PRS_AGCL_GAINOK
prsSignalAGCL_GAINREDUCED = PRS_AGCL_GAINREDUCED
prsSignalAGCL_IFPKI1 = PRS_AGCL_IFPKI1
prsSignalAGCL_IFPKQ2 = PRS_AGCL_IFPKQ2
prsSignalAGCL_IFPKRST = PRS_AGCL_IFPKRST
prsSignalAGC_PEAKDET = PRS_AGC_PEAKDET
prsSignalAGC_PROPAGATED = PRS_AGC_PROPAGATED
prsSignalAGC_RSSIDONE = PRS_AGC_RSSIDONE
prsSignalMODEML_ADVANCE = PRS_MODEML_ADVANCE
prsSignalMODEML_ANT0 = PRS_MODEML_ANT0
prsSignalMODEML_ANT1 = PRS_MODEML_ANT1
prsSignalMODEML_COHDSADET = PRS_MODEML_COHDSADET
prsSignalMODEML_COHDSALIVE = PRS_MODEML_COHDSALIVE
prsSignalMODEML_DCLK = PRS_MODEML_DCLK
prsSignalMODEML_DOUT = PRS_MODEML_DOUT
prsSignalMODEML_FRAMEDET = PRS_MODEML_FRAMEDET
prsSignalMODEM_FRAMESENT = PRS_MODEM_FRAMESENT
prsSignalMODEM_PREDET = PRS_MODEM_PREDET
prsSignalMODEM_LRDSADET = PRS_MODEM_LRDSADET
prsSignalMODEM_LRDSALIVE = PRS_MODEM_LRDSALIVE
prsSignalMODEM_LOWCORR = PRS_MODEM_LOWCORR
prsSignalMODEM_NEWSYMBOL = PRS_MODEM_NEWSYMBOL
prsSignalMODEM_NEWWND = PRS_MODEM_NEWWND
prsSignalMODEM_POSTPONE = PRS_MODEM_POSTPONE
prsSignalMODEMH_PRESENT = PRS_MODEMH_PRESENT
prsSignalMODEMH_RSSIJUMP = PRS_MODEMH_RSSIJUMP
prsSignalMODEMH_SYNCSENT = PRS_MODEMH_SYNCSENT
prsSignalMODEMH_TIMDET = PRS_MODEMH_TIMDET
prsSignalMODEMH_WEAK = PRS_MODEMH_WEAK
prsSignalMODEMH_EOF = PRS_MODEMH_EOF
prsSignalFRC_DCLK = PRS_FRC_DCLK
prsSignalFRC_DOUT = PRS_FRC_DOUT
prsSignalPROTIMERL_BOF = PRS_PROTIMERL_BOF
prsSignalPROTIMERL_CC0 = PRS_PROTIMERL_CC0
prsSignalPROTIMERL_CC1 = PRS_PROTIMERL_CC1
prsSignalPROTIMERL_CC2 = PRS_PROTIMERL_CC2
prsSignalPROTIMERL_CC3 = PRS_PROTIMERL_CC3
prsSignalPROTIMERL_CC4 = PRS_PROTIMERL_CC4
prsSignalPROTIMERL_LBTF = PRS_PROTIMERL_LBTF
prsSignalPROTIMERL_LBTR = PRS_PROTIMERL_LBTR
prsSignalPROTIMER_LBTS = PRS_PROTIMER_LBTS
prsSignalPROTIMER_POF = PRS_PROTIMER_POF
prsSignalPROTIMER_T0MATCH = PRS_PROTIMER_T0MATCH
prsSignalPROTIMER_T0UF = PRS_PROTIMER_T0UF
prsSignalPROTIMER_T1MATCH = PRS_PROTIMER_T1MATCH
prsSignalPROTIMER_T1UF = PRS_PROTIMER_T1UF
prsSignalPROTIMER_WOF = PRS_PROTIMER_WOF
prsSignalRACL_ACTIVE = PRS_RACL_ACTIVE
prsSignalRACL_LNAEN = PRS_RACL_LNAEN
prsSignalRACL_PAEN = PRS_RACL_PAEN
prsSignalRACL_RX = PRS_RACL_RX
prsSignalRACL_TX = PRS_RACL_TX
prsSignalRACL_CTIOUT0 = PRS_RACL_CTIOUT0
prsSignalRACL_CTIOUT1 = PRS_RACL_CTIOUT1
prsSignalRACL_CTIOUT2 = PRS_RACL_CTIOUT2
prsSignalRAC_CTIOUT3 = PRS_RAC_CTIOUT3
prsSignalRAC_AUXADCDATA = PRS_RAC_AUXADCDATA
prsSignalRAC_AUXADCDATAVALID = PRS_RAC_AUXADCDATAVALID
prsSignalSYNTH_MUX0 = PRS_SYNTH_MUX0
prsSignalSYNTH_MUX1 = PRS_SYNTH_MUX1
prsSignalRFFPLL0L_CLKDIGDIV4 = PRS_RFFPLL0L_CLKDIGDIV4
prsSignalRFFPLL0L_CLKMODEMDIV4 = PRS_RFFPLL0L_CLKMODEMDIV4
prsSignalETAMPDET_TAMPERSRCETAMPDET = PRS_ETAMPDET_TAMPERSRCETAMPDET
}

PRS Signal.

enum
prsConsumerNone = 0x000
prsConsumerCMU_CALDN = offsetof(PRS_TypeDef, CONSUMER_CMU_CALDN)
prsConsumerCMU_CALUP = offsetof(PRS_TypeDef, CONSUMER_CMU_CALUP)
prsConsumerIADC0_SCANTRIGGER = offsetof(PRS_TypeDef, CONSUMER_IADC0_SCANTRIGGER)
prsConsumerIADC0_SINGLETRIGGER = offsetof(PRS_TypeDef, CONSUMER_IADC0_SINGLETRIGGER)
prsConsumerLDMA_REQUEST0 = offsetof(PRS_TypeDef, CONSUMER_LDMAXBAR_DMAREQ0)
prsConsumerLDMA_REQUEST1 = offsetof(PRS_TypeDef, CONSUMER_LDMAXBAR_DMAREQ1)
prsConsumerLETIMER0_CLEAR = offsetof(PRS_TypeDef, CONSUMER_LETIMER0_CLEAR)
prsConsumerLETIMER0_START = offsetof(PRS_TypeDef, CONSUMER_LETIMER0_START)
prsConsumerLETIMER0_STOP = offsetof(PRS_TypeDef, CONSUMER_LETIMER0_STOP)
prsConsumerTIMER0_CC0 = offsetof(PRS_TypeDef, CONSUMER_TIMER0_CC0)
prsConsumerTIMER0_CC1 = offsetof(PRS_TypeDef, CONSUMER_TIMER0_CC1)
prsConsumerTIMER0_CC2 = offsetof(PRS_TypeDef, CONSUMER_TIMER0_CC2)
prsConsumerTIMER1_CC0 = offsetof(PRS_TypeDef, CONSUMER_TIMER1_CC0)
prsConsumerTIMER1_CC1 = offsetof(PRS_TypeDef, CONSUMER_TIMER1_CC1)
prsConsumerTIMER1_CC2 = offsetof(PRS_TypeDef, CONSUMER_TIMER1_CC2)
prsConsumerTIMER2_CC0 = offsetof(PRS_TypeDef, CONSUMER_TIMER2_CC0)
prsConsumerTIMER2_CC1 = offsetof(PRS_TypeDef, CONSUMER_TIMER2_CC1)
prsConsumerTIMER2_CC2 = offsetof(PRS_TypeDef, CONSUMER_TIMER2_CC2)
prsConsumerTIMER3_CC0 = offsetof(PRS_TypeDef, CONSUMER_TIMER3_CC0)
prsConsumerTIMER3_CC1 = offsetof(PRS_TypeDef, CONSUMER_TIMER3_CC1)
prsConsumerTIMER3_CC2 = offsetof(PRS_TypeDef, CONSUMER_TIMER3_CC2)
prsConsumerTIMER4_CC0 = offsetof(PRS_TypeDef, CONSUMER_TIMER4_CC0)
prsConsumerTIMER4_CC1 = offsetof(PRS_TypeDef, CONSUMER_TIMER4_CC1)
prsConsumerTIMER4_CC2 = offsetof(PRS_TypeDef, CONSUMER_TIMER4_CC2)
prsConsumerTIMER5_CC0 = offsetof(PRS_TypeDef, CONSUMER_TIMER5_CC0)
prsConsumerTIMER5_CC1 = offsetof(PRS_TypeDef, CONSUMER_TIMER5_CC1)
prsConsumerTIMER5_CC2 = offsetof(PRS_TypeDef, CONSUMER_TIMER5_CC2)
prsConsumerTIMER6_CC0 = offsetof(PRS_TypeDef, CONSUMER_TIMER6_CC0)
prsConsumerTIMER6_CC1 = offsetof(PRS_TypeDef, CONSUMER_TIMER6_CC1)
prsConsumerTIMER6_CC2 = offsetof(PRS_TypeDef, CONSUMER_TIMER6_CC2)
prsConsumerTIMER7_CC0 = offsetof(PRS_TypeDef, CONSUMER_TIMER7_CC0)
prsConsumerTIMER7_CC1 = offsetof(PRS_TypeDef, CONSUMER_TIMER7_CC1)
prsConsumerTIMER7_CC2 = offsetof(PRS_TypeDef, CONSUMER_TIMER7_CC2)
prsConsumerEUSART0_CLK = offsetof(PRS_TypeDef, CONSUMER_EUSART0_CLK)
prsConsumerEUSART0_RX = offsetof(PRS_TypeDef, CONSUMER_EUSART0_RX)
prsConsumerEUSART0_TRIGGER = offsetof(PRS_TypeDef, CONSUMER_EUSART0_TRIGGER)
prsConsumerEUSART1_CLK = offsetof(PRS_TypeDef, CONSUMER_EUSART1_CLK)
prsConsumerEUSART1_RX = offsetof(PRS_TypeDef, CONSUMER_EUSART1_RX)
prsConsumerEUSART1_TRIGGER = offsetof(PRS_TypeDef, CONSUMER_EUSART1_TRIGGER)
prsConsumerEUSART2_CLK = offsetof(PRS_TypeDef, CONSUMER_EUSART2_CLK)
prsConsumerEUSART2_RX = offsetof(PRS_TypeDef, CONSUMER_EUSART2_RX)
prsConsumerEUSART2_TRIGGER = offsetof(PRS_TypeDef, CONSUMER_EUSART2_TRIGGER)
prsConsumerEUSART3_RX = offsetof(PRS_TypeDef, CONSUMER_EUSART3_RX)
prsConsumerEUSART3_TRIGGER = offsetof(PRS_TypeDef, CONSUMER_EUSART3_TRIGGER)
prsConsumerEUSART4_RX = offsetof(PRS_TypeDef, CONSUMER_EUSART4_RX)
prsConsumerEUSART4_TRIGGER = offsetof(PRS_TypeDef, CONSUMER_EUSART4_TRIGGER)
prsConsumerWDOG0_SRC0 = offsetof(PRS_TypeDef, CONSUMER_WDOG0_SRC0)
prsConsumerWDOG0_SRC1 = offsetof(PRS_TypeDef, CONSUMER_WDOG0_SRC1)
prsConsumerWDOG1_SRC0 = offsetof(PRS_TypeDef, CONSUMER_WDOG1_SRC0)
prsConsumerWDOG1_SRC1 = offsetof(PRS_TypeDef, CONSUMER_WDOG1_SRC1)
prsConsumerPCNT0_IN0 = offsetof(PRS_TypeDef, CONSUMER_PCNT0_S0IN)
prsConsumerPCNT0_IN1 = offsetof(PRS_TypeDef, CONSUMER_PCNT0_S1IN)
prsConsumerSYSRTC0_SRC0 = offsetof(PRS_TypeDef, CONSUMER_SYSRTC0_IN0)
prsConsumerSYSRTC0_SRC1 = offsetof(PRS_TypeDef, CONSUMER_SYSRTC0_IN1)
prsConsumerHFXO0_OSCREQ = offsetof(PRS_TypeDef, CONSUMER_HFXO0_OSCREQ)
prsConsumerHFXO0_TIMEOUT = offsetof(PRS_TypeDef, CONSUMER_HFXO0_TIMEOUT)
prsConsumerLESENSE_START = offsetof(PRS_TypeDef, CONSUMER_LESENSE_START)
prsConsumerVDAC0_ASYNCTRIGCH0 = offsetof(PRS_TypeDef, CONSUMER_VDAC0_ASYNCTRIGCH0)
prsConsumerVDAC0_ASYNCTRIGCH1 = offsetof(PRS_TypeDef, CONSUMER_VDAC0_ASYNCTRIGCH1)
prsConsumerVDAC0_SYNCTRIGCH0 = offsetof(PRS_TypeDef, CONSUMER_VDAC0_SYNCTRIGCH0)
prsConsumerVDAC0_SYNCTRIGCH1 = offsetof(PRS_TypeDef, CONSUMER_VDAC0_SYNCTRIGCH1)
}

PRS Consumers.

Functions#

void
PRS_LevelSet(uint32_t level, uint32_t mask)

Set level control bit for one or more channels.

uint32_t

Get level control bit for all channels.

uint32_t
PRS_Values(PRS_ChType_t type)

Get the PRS channel values for all channels.

bool
PRS_ChannelValue(unsigned int ch, PRS_ChType_t type)

Get the PRS channel value for a single channel.

void
PRS_PulseTrigger(uint32_t channels)

Trigger a high pulse (one HFPERCLK) for one or more channels.

void
PRS_ChannelLevelSet(unsigned int ch, bool level)

Set the PRS channel level for one asynchronous PRS channel.

void
PRS_ChannelPulse(unsigned int ch)

Trigger a pulse on one PRS channel.

void
PRS_SourceSignalSet(unsigned int ch, uint32_t source, uint32_t signal, PRS_Edge_TypeDef edge)

Set a source and signal for a channel.

void
PRS_SourceAsyncSignalSet(unsigned int ch, uint32_t source, uint32_t signal)

Set the source and asynchronous signal for a channel.

int
PRS_GetFreeChannel(PRS_ChType_t type)

Search for the first free PRS channel.

void
PRS_Reset(void)

Reset all PRS channels.

void
PRS_ConnectSignal(unsigned int ch, PRS_ChType_t type, PRS_Signal_t signal)

Connect a PRS signal to a channel.

uint32_t
PRS_ConvertToSyncSource(uint32_t asyncSource)

Convert an async PRS source to a sync source.

uint32_t
PRS_ConvertToSyncSignal(uint32_t asyncSource, uint32_t asyncSignal)

Convert an async PRS signal to a sync signal.

void
PRS_ConnectConsumer(unsigned int ch, PRS_ChType_t type, PRS_Consumer_t consumer)

Connect a peripheral consumer to a PRS channel.

void
PRS_PinOutput(unsigned int ch, PRS_ChType_t type, GPIO_Port_TypeDef port, uint8_t pin)

Send the output of a PRS channel to a GPIO pin.

void
PRS_Combine(unsigned int chA, unsigned int chB, PRS_Logic_t logic)

Combine two PRS channels using a logic function.

Macros#

#define
PRS_SYNC_CHAN_COUNT PRS_SYNC_CH_NUM

PRS Synchronous channel count.

#define
PRS_ASYNC_CHAN_COUNT PRS_ASYNC_CH_NUM

PRS Asynchronous channel count.

#define

PRS asynchronous support.

Enumeration Documentation#

PRS_ChType_t#

PRS_ChType_t

PRS Channel type.

Enumerator
prsTypeAsync

Asynchronous channel type.

prsTypeSync

Synchronous channel type.


Definition at line 102 of file platform/emlib/inc/em_prs.h

PRS_Edge_TypeDef#

PRS_Edge_TypeDef

Edge detection type.

Enumerator
prsEdgeOff

Leave signal as is.

prsEdgePos

Generate pulses on positive edge.

prsEdgeNeg

Generate pulses on negative edge.

prsEdgeBoth

Generate pulses on both edges.


Definition at line 108 of file platform/emlib/inc/em_prs.h

PRS_Logic_t#

PRS_Logic_t

Logic functions that can be used when combining two PRS channels.

Enumerator
prsLogic_Zero

Logical 0.

prsLogic_A_NOR_B

A NOR B.

prsLogic_NOT_A_AND_B

(!A) NOR B.

prsLogic_NOT_A

!A.

prsLogic_A_AND_NOT_B

A AND (!B).

prsLogic_NOT_B

!B.

prsLogic_A_XOR_B

A XOR B.

prsLogic_A_NAND_B

A NAND B.

prsLogic_A_AND_B

A AND B.

prsLogic_A_XNOR_B

A XNOR B.

prsLogic_B

B.

prsLogic_NOT_A_OR_B

(!A) OR B.

prsLogic_A

A.

prsLogic_A_OR_NOT_B

A OR (!B).

prsLogic_A_OR_B

A OR B.

prsLogic_One

Logical 1.


Definition at line 117 of file platform/emlib/inc/em_prs.h

PRS_Signal_t#

PRS_Signal_t

PRS Signal.

Enumerator
prsSignalNone

No Signal.

prsSignalSW

Software-reserved Signal.

prsSignalTIMER0_UF

TIMER0 underflow Signal.

prsSignalTIMER0_OF

TIMER0 overflow Signal.

prsSignalTIMER0_CC0

TIMER0 capture/compare channel 0 Signal.

prsSignalTIMER0_CC1

TIMER0 capture/compare channel 1 Signal.

prsSignalTIMER0_CC2

TIMER0 capture/compare channel 2 Signal.

prsSignalTIMER1_UF

TIMER1 underflow Signal.

prsSignalTIMER1_OF

TIMER1 overflow Signal.

prsSignalTIMER1_CC0

TIMER1 capture/compare channel 0 Signal.

prsSignalTIMER1_CC1

TIMER1 capture/compare channel 1 Signal.

prsSignalTIMER1_CC2

TIMER1 capture/compare channel 2 Signal.

prsSignalTIMER2_UF

TIMER2 underflow Signal.

prsSignalTIMER2_OF

TIMER2 overflow Signal.

prsSignalTIMER2_CC0

TIMER2 capture/compare channel 0 Signal.

prsSignalTIMER2_CC1

TIMER2 capture/compare channel 1 Signal.

prsSignalTIMER2_CC2

TIMER2 capture/compare channel 2 Signal.

prsSignalTIMER3_UF

TIMER3 underflow Signal.

prsSignalTIMER3_OF

TIMER3 overflow Signal.

prsSignalTIMER3_CC0

TIMER3 capture/compare channel 0 Signal.

prsSignalTIMER3_CC1

TIMER3 capture/compare channel 1 Signal.

prsSignalTIMER3_CC2

TIMER3 capture/compare channel 2 Signal.

prsSignalTIMER4_UF

TIMER4 underflow Signal.

prsSignalTIMER4_OF

TIMER4 overflow Signal.

prsSignalTIMER4_CC0

TIMER4 capture/compare channel 0 Signal.

prsSignalTIMER4_CC1

TIMER4 capture/compare channel 1 Signal.

prsSignalTIMER4_CC2

TIMER4 capture/compare channel 2 Signal.

prsSignalTIMER5_UF

TIMER5 underflow Signal.

prsSignalTIMER5_OF

TIMER5 overflow Signal.

prsSignalTIMER5_CC0

TIMER5 capture/compare channel 0 Signal.

prsSignalTIMER5_CC1

TIMER5 capture/compare channel 1 Signal.

prsSignalTIMER5_CC2

TIMER5 capture/compare channel 2 Signal.

prsSignalTIMER6_UF

TIMER6 underflow Signal.

prsSignalTIMER6_OF

TIMER6 overflow Signal.

prsSignalTIMER6_CC0

TIMER6 capture/compare channel 0 Signal.

prsSignalTIMER6_CC1

TIMER6 capture/compare channel 1 Signal.

prsSignalTIMER6_CC2

TIMER6 capture/compare channel 2 Signal.

prsSignalTIMER7_UF

TIMER7 underflow Signal.

prsSignalTIMER7_OF

TIMER7 overflow Signal.

prsSignalTIMER7_CC0

TIMER7 capture/compare channel 0 Signal.

prsSignalTIMER7_CC1

TIMER7 capture/compare channel 1 Signal.

prsSignalTIMER7_CC2

TIMER7 capture/compare channel 2 Signal.

prsSignalLETIMER0_CH0

LETIMER0 channel 0 Signal.

prsSignalLETIMER0_CH1

LETIMER0 channel 1 Signal.

prsSignalPCNT0_UFOF

PCNT0_TCC Signal.

prsSignalPCNT0_DIR

PCNT0_TCC Signal.

prsSignalCORE_CTIOUT0

CORE CTIOUT0 Signal.

prsSignalCORE_CTIOUT1

CORE CTIOUT1 Signal.

prsSignalCORE_CTIOUT2

CORE CTIOUT2 Signal.

prsSignalCORE_CTIOUT3

CORE CTIOUT3 Signal.

prsSignalCMUL_CLKOUT0

CMU CLKOUT0 Signal.

prsSignalCMUL_CLKOUT1

CMU CLKOUT1 Signal.

prsSignalCMUL_CLKOUT2

CMU CLKOUT2 Signal.

prsSignalPRSL_ASYNCH0

PRS channel 0 Signal.

prsSignalPRSL_ASYNCH1

PRS channel 1 Signal.

prsSignalPRSL_ASYNCH2

PRS channel 2 Signal.

prsSignalPRSL_ASYNCH3

PRS channel 3 Signal.

prsSignalPRSL_ASYNCH4

PRS channel 4 Signal.

prsSignalPRSL_ASYNCH5

PRS channel 5 Signal.

prsSignalPRSL_ASYNCH6

PRS channel 6 Signal.

prsSignalPRSL_ASYNCH7

PRS channel 7 Signal.

prsSignalPRS_ASYNCH8

PRS channel 8 Signal.

prsSignalPRS_ASYNCH9

PRS channel 9 Signal.

prsSignalPRS_ASYNCH10

PRS channel 10 Signal.

prsSignalPRS_ASYNCH11

PRS channel 11 Signal.

prsSignalBURTC_COMP

BURTC compare Signal.

prsSignalBURTC_OF

BURTC overflow Signal.

prsSignalSYSRTC0_GRP0OUT0

SYSRTC GRP0OUT0 Signal.

prsSignalSYSRTC0_GRP0OUT1

SYSRTC GRP0OUT1 Signal.

prsSignalSYSRTC0_GRP1OUT0

SYSRTC GRP1OUT0 Signal.

prsSignalSYSRTC0_GRP1OUT1

SYSRTC GRP1OUT1 Signal.

prsSignalHFXO0L_STATUS

HFXO0L_STATUS Signal.

prsSignalHFXO0L_STATUS1

HFXO0L_STATUS1 Signal.

prsSignalACMP0_OUT

ACMP0 Signal.

prsSignalACMP1_OUT

ACMP1 output Signal.

prsSignalVDAC0_CH0WARM

VDAC0 channel 0 warmed Signal.

prsSignalVDAC0_CH1WARM

VDAC0 channel 1 warmed Signal.

prsSignalVDAC0_CH0DONE

VDAC0 channel 0 conversion done Signal.

prsSignalVDAC0_CH1DONE

VDAC0 channel 1 conversion done Signal.

prsSignalVDAC0_INTERNALTIMEROF

VDAC0 internal timer overflow Signal.

prsSignalVDAC0_REFRESHTIMEROF

VDAC0 internal timer overflow Signal.

prsSignalLESENSE_DECOUT0

LESENSE_DECOUT0 Signal.

prsSignalLESENSE_DECOUT1

LESENSE_DECOUT1 Signal.

prsSignalLESENSE_DECOUT2

LESENSE_DECOUT2 Signal.

prsSignalLESENSE_DECCMP

LESENSE_DECCMP Signal.

prsSignalEUSART0_CS

EUSART0 chip select Signal.

prsSignalEUSART0_IRTX

EUSART0 IR RX Signal.

prsSignalEUSART0_RTS

EUSART0 RTS Signal.

prsSignalEUSART0_RXDATA

EUSART0 RX data available Signal.

prsSignalEUSART0_TX

EUSART0 TX Signal.

prsSignalEUSART0_TXC

EUSART0 TX complete Signal.

prsSignalEUSART0_RXFL

EUSART0 rxfl Signal.

prsSignalEUSART0_TXFL

EUSART0 txfl Signal.

prsSignalEUSART1_CS

EUSART1 chip select Signal.

prsSignalEUSART1_IRTX

EUSART1 IR TX Signal.

prsSignalEUSART1_RTS

EUSART1 RTS Signal.

prsSignalEUSART1_RXDATA

EUSART1 RX data available Signal.

prsSignalEUSART1_TX

EUSART1 TX Signal.

prsSignalEUSART1_TXC

EUSART1 TX complete Signal.

prsSignalEUSART1_RXFL

EUSART1 rxfl Signal.

prsSignalEUSART1_TXFL

EUSART1 txfl Signal.

prsSignalEUSART2_CS

EUSART2 chip select Signal.

prsSignalEUSART2_IRTX

EUSART2 IR TX Signal.

prsSignalEUSART2_RTS

EUSART2 RTS Signal.

prsSignalEUSART2_RXDATA

EUSART2 RX data available Signal.

prsSignalEUSART2_TX

EUSART2 TX Signal.

prsSignalEUSART2_TXC

EUSART2 TX complete Signal.

prsSignalEUSART2_RXFL

EUSART2 rxfl Signal.

prsSignalEUSART2_TXFL

EUSART2 txfl Signal.

prsSignalEUSART3_CS

EUSART3 chip select Signal.

prsSignalEUSART3_IRTX

EUSART3 IR TX Signal.

prsSignalEUSART3_RTS

EUSART3 RTS Signal.

prsSignalEUSART3_RXDATA

EUSART3 RX data available Signal.

prsSignalEUSART3_TX

EUSART3 TX Signal.

prsSignalEUSART3_TXC

EUSART3 TX complete Signal.

prsSignalEUSART3_RXFL

EUSART3 rxfl Signal.

prsSignalEUSART3_TXFL

EUSART3 txfl Signal.

prsSignalEUSART4_CS

EUSART4 chip select Signal.

prsSignalEUSART4_IRTX

EUSART4 IR TX Signal.

prsSignalEUSART4_RTS

EUSART4 RTS Signal.

prsSignalEUSART4_RXDATA

EUSART4 RX data available Signal.

prsSignalEUSART4_TX

EUSART4 TX Signal.

prsSignalEUSART4_TXC

EUSART4 TX complete Signal.

prsSignalEUSART4_RXFL

EUSART4 rxfl Signal.

prsSignalEUSART4_TXFL

EUSART4 txfl Signal.

prsSignalIADC0_SCANENTRY

IADC0 scan entry Signal.

prsSignalIADC0_SCANTABLE

IADC0 scan table Signal.

prsSignalIADC0_SINGLE

IADC0 single Signal.

prsSignalGPIO_PIN0

GPIO Pin 0 Signal.

prsSignalGPIO_PIN1

GPIO Pin 1 Signal.

prsSignalGPIO_PIN2

GPIO Pin 2 Signal.

prsSignalGPIO_PIN3

GPIO Pin 3 Signal.

prsSignalGPIO_PIN4

GPIO Pin 4 Signal.

prsSignalGPIO_PIN5

GPIO Pin 5 Signal.

prsSignalGPIO_PIN6

GPIO Pin 6 Signal.

prsSignalGPIO_PIN7

GPIO Pin 7 Signal.

prsSignalAGCL_CCA

AGCL_CCA Signal.

prsSignalAGCL_CCAREQ

AGCL_CCAREQ Signal.

prsSignalAGCL_GAINADJUST

AGCL_GAINADJUST Signal.

prsSignalAGCL_GAINOK

AGCL_GAINOK Signal.

prsSignalAGCL_GAINREDUCED

AGCL_GAINREDUCED Signal.

prsSignalAGCL_IFPKI1

AGCL_IFPKI1 Signal.

prsSignalAGCL_IFPKQ2

AGCL_IFPKQ2 Signal.

prsSignalAGCL_IFPKRST

AGCL_IFPKRST Signal.

prsSignalAGC_PEAKDET

AGC_PEAKDET Signal.

prsSignalAGC_PROPAGATED

AGC_PROPAGATED Signal.

prsSignalAGC_RSSIDONE

AGC_RSSIDONE Signal.

prsSignalMODEML_ADVANCE

MODEML_ADVANCE Signal.

prsSignalMODEML_ANT0

MODEML_ANT0 Signal.

prsSignalMODEML_ANT1

MODEML_ANT1 Signal.

prsSignalMODEML_COHDSADET

MODEML_COHDSADET Signal.

prsSignalMODEML_COHDSALIVE

MODEML_COHDSALIVE Signal.

prsSignalMODEML_DCLK

MODEML_DCLK Signal.

prsSignalMODEML_DOUT

MODEML_DOUT Signal.

prsSignalMODEML_FRAMEDET

MODEML_FRAMEDET Signal.

prsSignalMODEM_FRAMESENT

MODEM_FRAMESENT Signal.

prsSignalMODEM_PREDET

MODEM_PREDET Signal.

prsSignalMODEM_LRDSADET

MODEM_LRDSADET Signal.

prsSignalMODEM_LRDSALIVE

MODEM_LRDSALIVE Signal.

prsSignalMODEM_LOWCORR

MODEM_LOWCORR Signal.

prsSignalMODEM_NEWSYMBOL

MODEM_NEWSYMBOL Signal.

prsSignalMODEM_NEWWND

MODEM_NEWWND Signal.

prsSignalMODEM_POSTPONE

MODEM_POSTPONE Signal.

prsSignalMODEMH_PRESENT

MODEMH_PRESENT Signal.

prsSignalMODEMH_RSSIJUMP

MODEMH_RSSIJUMP Signal.

prsSignalMODEMH_SYNCSENT

MODEMH_SYNCSENT Signal.

prsSignalMODEMH_TIMDET

MODEMH_TIMDET Signal.

prsSignalMODEMH_WEAK

MODEMH_WEAK Signal.

prsSignalMODEMH_EOF

MODEMH_EOF Signal.

prsSignalFRC_DCLK

FRC_DCLK Signal.

prsSignalFRC_DOUT

FRC_DOUT Signal.

prsSignalPROTIMERL_BOF

PROTIMERL_BOF Signal.

prsSignalPROTIMERL_CC0

PROTIMERL_CC0 Signal.

prsSignalPROTIMERL_CC1

PROTIMERL_CC1 Signal.

prsSignalPROTIMERL_CC2

PROTIMERL_CC2 Signal.

prsSignalPROTIMERL_CC3

PROTIMERL_CC3 Signal.

prsSignalPROTIMERL_CC4

PROTIMERL_CC4 Signal.

prsSignalPROTIMERL_LBTF

PROTIMERL_LBTF Signal.

prsSignalPROTIMERL_LBTR

PROTIMERL_LBTR Signal.

prsSignalPROTIMER_LBTS

PROTIMER_LBTS Signal.

prsSignalPROTIMER_POF

PROTIMER_POF Signal.

prsSignalPROTIMER_T0MATCH

PROTIMER_T0MATCH Signal.

prsSignalPROTIMER_T0UF

PROTIMER_T0UF Signal.

prsSignalPROTIMER_T1MATCH

PROTIMER_T1MATCH Signal.

prsSignalPROTIMER_T1UF

PROTIMER_T1UF Signal.

prsSignalPROTIMER_WOF

PROTIMER_WOF Signal.

prsSignalRACL_ACTIVE

RACL_ACTIVE Signal.

prsSignalRACL_LNAEN

RACL_LNAEN Signal.

prsSignalRACL_PAEN

RACL_PAEN Signal.

prsSignalRACL_RX

RACL_RX Signal.

prsSignalRACL_TX

RACL_TX Signal.

prsSignalRACL_CTIOUT0

RACL_CTIOUT0 Signal.

prsSignalRACL_CTIOUT1

RACL_CTIOUT1 Signal.

prsSignalRACL_CTIOUT2

RACL_CTIOUT2 Signal.

prsSignalRAC_CTIOUT3

RAC_CTIOUT3 Signal.

prsSignalRAC_AUXADCDATA

RAC_AUXADCDATA Signal.

prsSignalRAC_AUXADCDATAVALID

RAC_AUXADCDATAVALID Signal.

prsSignalSYNTH_MUX0

SYNTH_MUX0 Signal.

prsSignalSYNTH_MUX1

SYNTH_MUX1 Signal.

prsSignalRFFPLL0L_CLKDIGDIV4

RFFPLL0L CLKDIGDIV4 Signal.

prsSignalRFFPLL0L_CLKMODEMDIV4

RFFPLL0L CLKMODEMDIV4 Signal.

prsSignalETAMPDET_TAMPERSRCETAMPDET

ETAMPDET TAMPERSRCETAMPDET Signal.


Definition at line 138 of file platform/emlib/inc/em_prs.h

PRS_Consumer_t#

PRS_Consumer_t

PRS Consumers.

Enumerator
prsConsumerNone

No PRS consumer.

prsConsumerCMU_CALDN

CMU calibration down consumer.

prsConsumerCMU_CALUP

CMU calibration up consumer.

prsConsumerIADC0_SCANTRIGGER

IADC0 scan trigger consumer.

prsConsumerIADC0_SINGLETRIGGER

IADC0 single trigger consumer.

prsConsumerLDMA_REQUEST0

LDMA Request 0 consumer.

prsConsumerLDMA_REQUEST1

LDMA Request 1 consumer.

prsConsumerLETIMER0_CLEAR

LETIMER0 clear consumer.

prsConsumerLETIMER0_START

LETIMER0 start consumer.

prsConsumerLETIMER0_STOP

LETIMER0 stop consumer.

prsConsumerTIMER0_CC0

TIMER0 capture/compare channel 0 consumer.

prsConsumerTIMER0_CC1

TIMER0 capture/compare channel 1 consumer.

prsConsumerTIMER0_CC2

TIMER0 capture/compare channel 2 consumer.

prsConsumerTIMER1_CC0

TIMER1 capture/compare channel 0 consumer.

prsConsumerTIMER1_CC1

TIMER1 capture/compare channel 1 consumer.

prsConsumerTIMER1_CC2

TIMER1 capture/compare channel 2 consumer.

prsConsumerTIMER2_CC0

TIMER2 capture/compare channel 0 consumer.

prsConsumerTIMER2_CC1

TIMER2 capture/compare channel 1 consumer.

prsConsumerTIMER2_CC2

TIMER2 capture/compare channel 2 consumer.

prsConsumerTIMER3_CC0

TIMER3 capture/compare channel 0 consumer.

prsConsumerTIMER3_CC1

TIMER3 capture/compare channel 1 consumer.

prsConsumerTIMER3_CC2

TIMER3 capture/compare channel 2 consumer.

prsConsumerTIMER4_CC0

TIMER4 capture/compare channel 0 consumer.

prsConsumerTIMER4_CC1

TIMER4 capture/compare channel 1 consumer.

prsConsumerTIMER4_CC2

TIMER4 capture/compare channel 2 consumer.

prsConsumerTIMER5_CC0

TIMER5 capture/compare channel 0 consumer.

prsConsumerTIMER5_CC1

TIMER5 capture/compare channel 1 consumer.

prsConsumerTIMER5_CC2

TIMER5 capture/compare channel 2 consumer.

prsConsumerTIMER6_CC0

TIMER6 capture/compare channel 0 consumer.

prsConsumerTIMER6_CC1

TIMER6 capture/compare channel 1 consumer.

prsConsumerTIMER6_CC2

TIMER6 capture/compare channel 2 consumer.

prsConsumerTIMER7_CC0

TIMER7 capture/compare channel 0 consumer.

prsConsumerTIMER7_CC1

TIMER7 capture/compare channel 1 consumer.

prsConsumerTIMER7_CC2

TIMER7 capture/compare channel 2 consumer.

prsConsumerEUSART0_CLK

EUSART0 clk consumer.

prsConsumerEUSART0_RX

EUSART0 RX consumer.

prsConsumerEUSART0_TRIGGER

EUSART0 trigger consumer.

prsConsumerEUSART1_CLK

EUSART1 clk consumer.

prsConsumerEUSART1_RX

EUSART1 RX consumer.

prsConsumerEUSART1_TRIGGER

EUSART1 trigger consumer.

prsConsumerEUSART2_CLK

EUSART1 clk consumer.

prsConsumerEUSART2_RX

EUSART2 RX consumer.

prsConsumerEUSART2_TRIGGER

EUSART2 trigger consumer.

prsConsumerEUSART3_RX

EUSART3 RX consumer.

prsConsumerEUSART3_TRIGGER

EUSART3 trigger consumer.

prsConsumerEUSART4_RX

EUSART4 RX consumer.

prsConsumerEUSART4_TRIGGER

EUSART4 trigger consumer.

prsConsumerWDOG0_SRC0

WDOG0 source 0 consumer.

prsConsumerWDOG0_SRC1

WDOG0 source 1 consumer.

prsConsumerWDOG1_SRC0

WDOG1 source 0 consumer.

prsConsumerWDOG1_SRC1

WDOG1 source 1 consumer.

prsConsumerPCNT0_IN0

PCNT0 input 0 consumer.

prsConsumerPCNT0_IN1

PCNT0 input 1 consumer.

prsConsumerSYSRTC0_SRC0

SYSRTC0 input 0 consumer.

prsConsumerSYSRTC0_SRC1

SYSRTC0 input 1 consumer.

prsConsumerHFXO0_OSCREQ

OSCREQ consumer.

prsConsumerHFXO0_TIMEOUT

HFXO0_TIMEOUT consumer.

prsConsumerLESENSE_START

LESENSE_START consumer.

prsConsumerVDAC0_ASYNCTRIGCH0

VDAC0 ASYNC TRIGER CH0 consumer.

prsConsumerVDAC0_ASYNCTRIGCH1

VDAC0 ASYNC TRIGER CH1 consumer.

prsConsumerVDAC0_SYNCTRIGCH0

VDAC0 SYNC TRIGER CH0 consumer.

prsConsumerVDAC0_SYNCTRIGCH1

VDAC0 SYNC TRIGER CH1 consumer.


Definition at line 857 of file platform/emlib/inc/em_prs.h

Function Documentation#

PRS_LevelSet#

void PRS_LevelSet (uint32_t level, uint32_t mask)

Set level control bit for one or more channels.

Parameters
[in]level

Level to use for channels indicated by mask. Use logical OR combination of PRS_SWLEVEL_CHnLEVEL defines for channels to set high level, otherwise 0.

[in]mask

Mask indicating which channels to set level for. Use logical OR combination of PRS_SWLEVEL_CHnLEVEL defines.

The level value for a channel is XORed with both the pulse possibly issued by PRS_PulseTrigger() and the PRS input signal selected for the channel(s).

Note

  • Note that software level control is only available for asynchronous channels on Series 2 devices.


Definition at line 1016 of file platform/emlib/inc/em_prs.h

PRS_LevelGet#

uint32_t PRS_LevelGet (void )

Get level control bit for all channels.

Parameters
N/A

Returns

  • The current software level configuration.


Definition at line 1032 of file platform/emlib/inc/em_prs.h

PRS_Values#

uint32_t PRS_Values (PRS_ChType_t type)

Get the PRS channel values for all channels.

Parameters
[in]type

PRS channel type. This can be either prsTypeAsync or prsTypeSync.

Returns

  • The current PRS channel output values for all channels as a bitset.


Definition at line 1053 of file platform/emlib/inc/em_prs.h

PRS_ChannelValue#

bool PRS_ChannelValue (unsigned int ch, PRS_ChType_t type)

Get the PRS channel value for a single channel.

Parameters
[in]ch

PRS channel number.

[in]type

PRS channel type. This can be either prsTypeAsync or prsTypeSync.

Returns

  • The current PRS channel output value. This is either 0 or 1.


Definition at line 1081 of file platform/emlib/inc/em_prs.h

PRS_PulseTrigger#

void PRS_PulseTrigger (uint32_t channels)

Trigger a high pulse (one HFPERCLK) for one or more channels.

Parameters
[in]channels

Logical ORed combination of channels to trigger a pulse for. Use PRS_SWPULSE_CHnPULSE defines.

Setting a bit for a channel causes the bit in the register to remain high for one HFPERCLK cycle. Pulse is XORed with both the corresponding bit in PRS SWLEVEL register and the PRS input signal selected for the channel(s).


Definition at line 1101 of file platform/emlib/inc/em_prs.h

PRS_ChannelLevelSet#

void PRS_ChannelLevelSet (unsigned int ch, bool level)

Set the PRS channel level for one asynchronous PRS channel.

Parameters
[in]ch

PRS channel number.

[in]level

true to set the level high (1) and false to set the level low (0).


Definition at line 1120 of file platform/emlib/inc/em_prs.h

PRS_ChannelPulse#

void PRS_ChannelPulse (unsigned int ch)

Trigger a pulse on one PRS channel.

Parameters
[in]ch

PRS channel number.


Definition at line 1132 of file platform/emlib/inc/em_prs.h

PRS_SourceSignalSet#

void PRS_SourceSignalSet (unsigned int ch, uint32_t source, uint32_t signal, PRS_Edge_TypeDef edge)

Set a source and signal for a channel.

Parameters
[in]ch

A channel to define the signal and source for.

[in]source

A source to select for the channel. Use one of PRS_CH_CTRL_SOURCESEL_x defines.

[in]signal

A signal (for selected source) to use. Use one of PRS_CH_CTRL_SIGSEL_x defines.

[in]edge

An edge (for selected source/signal) to generate the pulse for.


Definition at line 323 of file platform/emlib/src/em_prs.c

PRS_SourceAsyncSignalSet#

void PRS_SourceAsyncSignalSet (unsigned int ch, uint32_t source, uint32_t signal)

Set the source and asynchronous signal for a channel.

Parameters
[in]ch

A channel to define the source and asynchronous signal for.

[in]source

A source to select for the channel. Use one of PRS_CH_CTRL_SOURCESEL_x defines.

[in]signal

An asynchronous signal (for selected source) to use. Use one of the PRS_CH_CTRL_SIGSEL_x defines that support asynchronous operation.

Asynchronous reflexes are not clocked on HFPERCLK and can be used even in EM2/EM3. There is a limitation to reflexes operating in asynchronous mode in that they can only be used by a subset of the reflex consumers. See the PRS chapter in the reference manual for the complete list of supported asynchronous signals and consumers.

Note

  • This function is not supported on EFM32GxxxFyyy parts. In asynchronous mode, the edge detector only works in EM0 and should not be used. The EDSEL parameter in PRS_CHx_CTRL register is set to 0 (OFF) by default.


Definition at line 370 of file platform/emlib/src/em_prs.c

PRS_GetFreeChannel#

int PRS_GetFreeChannel (PRS_ChType_t type)

Search for the first free PRS channel.

Parameters
[in]type

PRS channel type. This can be either prsTypeAsync or prsTypeSync.

Returns

  • Channel number >= 0 if an unused PRS channel was found. If no free PRS channel was found then -1 is returned.


Definition at line 428 of file platform/emlib/src/em_prs.c

PRS_Reset#

void PRS_Reset (void )

Reset all PRS channels.

Parameters
N/A

This function will reset all the PRS channel configuration.


Definition at line 457 of file platform/emlib/src/em_prs.c

PRS_ConnectSignal#

void PRS_ConnectSignal (unsigned int ch, PRS_ChType_t type, PRS_Signal_t signal)

Connect a PRS signal to a channel.

Parameters
[in]ch

PRS channel number.

[in]type

PRS channel type. This can be either prsTypeAsync or prsTypeSync.

[in]signal

This is the PRS signal that should be placed on the channel.

This function will make the PRS signal available on the specific channel. Only a single PRS signal can be connected to any given channel.


Definition at line 495 of file platform/emlib/src/em_prs.c

PRS_ConvertToSyncSource#

uint32_t PRS_ConvertToSyncSource (uint32_t asyncSource)

Convert an async PRS source to a sync source.

Parameters
[in]asyncSource

The id of the asynchronous PRS source.

This conversion must be done because the id's of the same peripheral source is different depending on if it's used as an asynchronous PRS source or a synchronous PRS source.

Returns

  • The id of the corresponding synchronous PRS source.


Definition at line 126 of file platform/emlib/src/em_prs.c

PRS_ConvertToSyncSignal#

uint32_t PRS_ConvertToSyncSignal (uint32_t asyncSource, uint32_t asyncSignal)

Convert an async PRS signal to a sync signal.

Parameters
[in]asyncSource

The id of the asynchronous PRS source.

[in]asyncSignal

The id of the asynchronous PRS signal.

PRS values for some peripherals signals differ between asynchronous and synchronous PRS channels. This function must be used to handle the conversion.

Returns

  • The id of the corresponding synchronous PRS signal.


Definition at line 206 of file platform/emlib/src/em_prs.c

PRS_ConnectConsumer#

void PRS_ConnectConsumer (unsigned int ch, PRS_ChType_t type, PRS_Consumer_t consumer)

Connect a peripheral consumer to a PRS channel.

Parameters
[in]ch

PRS channel number.

[in]type

PRS channel type. This can be either prsTypeAsync or prsTypeSync.

[in]consumer

This is the PRS consumer.

Different peripherals can use PRS channels as their input. This function can be used to connect a peripheral consumer to a PRS channel. Multiple consumers can be connected to a single PRS channel.


Definition at line 554 of file platform/emlib/src/em_prs.c

PRS_PinOutput#

void PRS_PinOutput (unsigned int ch, PRS_ChType_t type, GPIO_Port_TypeDef port, uint8_t pin)

Send the output of a PRS channel to a GPIO pin.

Parameters
[in]ch

PRS channel number.

[in]type

PRS channel type. This can be either prsTypeAsync or prsTypeSync.

[in]port

GPIO port

[in]pin

GPIO pin

This function is used to send the output of a PRS channel to a GPIO pin. Note that there are certain restrictions to where a PRS channel can be routed. Consult the datasheet of the device to see if a channel can be routed to the requested GPIO pin. Some devices for instance can only route the async channels 0-5 on GPIO pins PAx and PBx while async channels 6-11 can only be routed to GPIO pins PCx and PDx


Definition at line 595 of file platform/emlib/src/em_prs.c

PRS_Combine#

void PRS_Combine (unsigned int chA, unsigned int chB, PRS_Logic_t logic)

Combine two PRS channels using a logic function.

Parameters
[in]chA

PRS Channel for the A input.

[in]chB

PRS Channel for the B input.

[in]logic

The logic function to use when combining the Channel A and Channel B. The output of the logic function is the output of Channel A. Function like AND, OR, XOR, NOT and more are available.

This function allows you to combine the output of one PRS channel with the the signal of another PRS channel using various logic functions. Note that for series 2, config 1 devices, the hardware only allows a PRS channel to be combined with the previous channel. So for instance channel 5 can be combined only with channel 4.

The logic function operates on two PRS channels called A and B. The output of PRS channel B is combined with the PRS source configured for channel A to produce an output. This output is used as the output of channel A.


Definition at line 640 of file platform/emlib/src/em_prs.c

Macro Definition Documentation#

PRS_SYNC_CHAN_COUNT#

#define PRS_SYNC_CHAN_COUNT
Value:
PRS_SYNC_CH_NUM

PRS Synchronous channel count.


Definition at line 57 of file platform/emlib/inc/em_prs.h

PRS_ASYNC_CHAN_COUNT#

#define PRS_ASYNC_CHAN_COUNT
Value:
PRS_ASYNC_CH_NUM

PRS Asynchronous channel count.


Definition at line 59 of file platform/emlib/inc/em_prs.h

PRS_ASYNC_SUPPORTED#

#define PRS_ASYNC_SUPPORTED
Value:
1

PRS asynchronous support.


Definition at line 74 of file platform/emlib/inc/em_prs.h