# UPP Module

The universal parallel port (UPP) API provides a set of functions to configure device’s UPP module. The driver provides functions to initialize the module, obtain status information and to manage interrupts. Both transmitter and receiver modes are supported.

group `upp_api`

  Defines

  `UPP_DMA_TX_MSGRAM_STARTADDR` UPP_TX_MSG_RAM_BASE
  `UPP_DMA_RX_MSGRAM_STARTADDR` 0x00007000U
  `UPP_CPU_TX_MSGRAM_STARTADDR` UPP_TX_MSG_RAM_BASE
  `UPP_CPU_RX_MSGRAM_STARTADDR` UPP_RX_MSG_RAM_BASE
  `UPP_TX_MSGRAM_MAX_SIZE` 0x200U
  `UPP_RX_MSGRAM_MAX_SIZE` 0x200U
  `UPP_32_CYCLE_NOP` __asm(" RPT #31 || NOP")
  `UPP_SOFT_FREE_M` ((uint16_t)UPP_PERCTL_SOFT

  | \

  (uint16_t)

  UPP_PERCTL_FREE)
  `UPP_TX_SIGNAL_MODE_M` UPP_IFCFG_WAITA
  `UPP_RX_SIGNAL_MODE_M` ((uint16_t)UPP_IFCFG_STARTA

  | \

  (uint16_t)

  UPP_IFCFG_ENAA)
  `UPP_SIGNAL_POLARITY_M` ((uint16_t)UPP_IFCFG_WAITPOLA

  | \

  (uint16_t)

  UPP_IFCFG_ENAPOLA

  | \

  (uint16_t)

  UPP_IFCFG_STARTPOLA)
  `UPP_INT_M` ((uint16_t)UPP_ENINTST_DPEI | (uint16_t)UPP_ENINTST_UOEI

  | \

  (uint16_t)

  UPP_ENINTST_EOWI | (uint16_t)UPP_ENINTST_EOLI

  | \

  (uint16_t)

  UPP_ENINTST_DPEQ | (uint16_t)UPP_ENINTST_UOEQ

  | \

  (uint16_t)

  UPP_ENINTST_EOWQ | (uint16_t)UPP_ENINTST_EOLQ)
  `UPP_INT_CHI_DMA_PROG_ERR` 0x0001U

    DMA Channel I Programming Error.

  `UPP_INT_CHI_UNDER_OVER_RUN` 0x0002U

    DMA Channel I Underrun/Overrun.

  `UPP_INT_CHI_END_OF_WINDOW` 0x0008U

    DMA Channel I EndOfWindow Event.

  `UPP_INT_CHI_END_OF_LINE` 0x0010U

    DMA Channel I EndOfLine Event.

  `UPP_INT_CHQ_DMA_PROG_ERR` 0x0100U

    DMA Channel Q Programming Error.

  `UPP_INT_CHQ_UNDER_OVER_RUN` 0x0200U

    DMA Channel Q Underrun/Overrun.

  `UPP_INT_CHQ_END_OF_WINDOW` 0x0800U

    DMA Channel Q EndOfWindow Event.

  `UPP_INT_CHQ_END_OF_LINE` 0x1000U

    DMA Channel Q EndOfLine Event.

  Enums

  enum `UPP_EmulationMode`

    Values that can be passed to UPP_setEmulationMode() as emuMode parameter.

    Values:

    enumerator `UPP_EMULATIONMODE_HARDSTOP` = 0x0U

      uPP stops immediately

    enumerator `UPP_EMULATIONMODE_RUNFREE` = 0x1U

      uPP unaffected by suspend

    enumerator `UPP_EMULATIONMODE_SOFTSTOP` = 0x2U

      uPP stops at DMA transaction finish

  enum `UPP_OperationMode`

    Values that can be passed to UPP_setOperationMode() as opMode parameter.

    Values:

    enumerator `UPP_RECEIVE_MODE` = 0x0U

      uPP to be configured as Receiver

    enumerator `UPP_TRANSMIT_MODE` = 0x1U

      uPP to be configured as Transmitter

  enum `UPP_DataRate`

    Values that can be passed to UPP_setDataRate() as dataRate parameter.

    Values:

    enumerator `UPP_DATA_RATE_SDR` = 0x00000U

      uPP to operate in Single Data Rate Mode

    enumerator `UPP_DATA_RATE_DDR` = 0x10000U

      uPP to operate in Double Data Rate Mode

  enum `UPP_TxSDRInterleaveMode`

    Values that can be passed to UPP_setTxSDRInterleaveMode() as mode parameter.

    Values:

    enumerator `UPP_TX_SDR_INTERLEAVE_DISABLE` = 0x0U

      Interleaving disabled in Tx SDR.

    enumerator `UPP_TX_SDR_INTERLEAVE_ENABLE` = 0x8U

      Interleaving enabled in Tx SDR.

  enum `UPP_DDRDemuxMode`

    Values that can be passed to UPP_setDDRDemuxMode() as mode parameter.

    Values:

    enumerator `UPP_DDR_DEMUX_DISABLE` = 0x00U

      Demultiplexing disabled in DDR mode.

    enumerator `UPP_DDR_DEMUX_ENABLE` = 0x10U

      Demultiplexing enabled in DDR mode.

  enum `UPP_SignalPolarity`

    Values that can be passed to UPP_setControlSignalPolarity() as waitPola, enablePola & startPola parameters.

    Values:

    enumerator `UPP_SIGNAL_POLARITY_HIGH` = 0x0U

      Signal polarity is active high.

    enumerator `UPP_SIGNAL_POLARITY_LOW` = 0x1U

      Signal polarity is active low.

  enum `UPP_SignalMode`

    Values that can be passed to UPP_setTxControlSignalMode() & UPP_setRxControlSignalMode() as waitMode & startMode, enableMode parameters respectively.

    Values:

    enumerator `UPP_SIGNAL_DISABLE` = 0x0U

      Control Signal is disabled for uPP.

    enumerator `UPP_SIGNAL_ENABLE` = 0x1U

      Control Signal is enabled for uPP.

  enum `UPP_ClockPolarity`

    Values that can be passed to UPP_setClockPolarity() as clkPolarity parameter.

    Values:

    enumerator `UPP_CLK_NOT_INVERTED` = 0x0000U

      uPP Clock is not inverted

    enumerator `UPP_CLK_INVERTED` = 0x1000U

      uPP clock is inverted

  enum `UPP_TxIdleDataMode`

    Values that can be passed to UPP_configTxIdleDataMode() as config parameter. It specifies whether the data lines will drive idle value or get tri-stated when uPP goes to idle state.

    Values:

    enumerator `UPP_TX_IDLE_DATA_IDLE` = 0x0000U

      Data lines will drive idle val.

    enumerator `UPP_TX_IDLE_DATA_TRISTATED` = 0x2000U

      Data lines will be tristated.

  enum `UPP_DMAChannel`

    Values that can be passed to UPP_setDMAReadThreshold(), UPP_getDMAChannelStatus(), UPP_setDMADescriptor(), UPP_isDescriptorPending(), UPP_isDescriptorActive() & UPP_getDMAFIFOWatermark() as channel parameter.

    Values:

    enumerator `UPP_DMA_CHANNEL_I` = 0U

      uPP internal DMA channel I

    enumerator `UPP_DMA_CHANNEL_Q` = 1U

      uPP internal DMA channel Q

  enum `UPP_ThresholdSize`

    Values that can be passed to UPP_setTxThreshold() and UPP_setDMAReadThreshold() as size parameter.

    Values:

    enumerator `UPP_THR_SIZE_64BYTE` = 0x0U

      Tx threshold size is 64 bytes.

    enumerator `UPP_THR_SIZE_128BYTE` = 0x1U

      Tx threshold size is 128 bytes.

    enumerator `UPP_THR_SIZE_256BYTE` = 0x3U

      Tx threshold size is 256 bytes.

  enum `UPP_InputDelay`

    Values that can be passed to UPP_setInputDelay() as delay parameter. All the following values lead to 2 cycle delay on clock pin.

    Values:

    enumerator `UPP_INPUT_DLY_4` = 0x0U

      4 cycle delay for data & control pins

    enumerator `UPP_INPUT_DLY_6` = 0x2U

      6 cycle delay for data & control pins

    enumerator `UPP_INPUT_DLY_9` = 0x4U

      9 cycle delay for data & control pins

    enumerator `UPP_INPUT_DLY_14` = 0x6U

      14 cycle delay for data & control pins

  Functions

  bool `UPP_isDMAActive`(uint32_t base)

    Returns uPP internal DMA state machine status.

    This function returns whether the uPP internal DMA state machine status is idle or burst transaction is active.

    Parameters

      - `base`: is the configuration address of the uPP instance used.

    Return

      Returns the DMA machine status. It can return following values:

      - true - DMA burst transaction is active

      - false - DMA is idle

  void `UPP_performSoftReset`(uint32_t base)

    Resets the uPP module.

    This function initiates software reset in uPP.

    Parameters

      - `base`: is the configuration address of the uPP instance used.

    Return

      None.

  void `UPP_enableModule`(uint32_t base)

    Enables the uPP module.

    This function enables the uPP module.

    Parameters

      - `base`: is the configuration address of the uPP instance used.

    Return

      None.

  void `UPP_disableModule`(uint32_t base)

    Disables the uPP module.

    This function disables the uPP module.

    Parameters

      - `base`: is the configuration address of the uPP instance used.

    Return

      None.

  void `UPP_enableEmulationMode`(uint32_t base)

    Enables real time emulation mode for uPP module.

    This function enables real time emulation mode in uPP module.

    Parameters

      - `base`: is the configuration address of the uPP instance used.

    Return

      None.

  void `UPP_disableEmulationMode`(uint32_t base)

    Disables real time emulation mode for uPP module.

    This function disables real time emulation mode for uPP module.

    Parameters

      - `base`: is the configuration address of the uPP instance used.

    Return

      None.

  void `UPP_setEmulationMode`(uint32_t base, UPP_EmulationMode emuMode)

    Sets the emulation mode for the uPP module.

    This function sets the uPP module’s emulation mode. This mode determines how the uPP module is affected by an emulation suspend. Valid values for

    emuMode parameter are the following:
    Parameters

      - `base`: is the configuration address of the uPP instance used.

      - `emuMode`: is the mode of operation upon an emulation suspend.

    - UPP_EMULATIONMODE_HARDSTOP - The uPP module stops immediately.

    - UPP_EMULATIONMODE_RUNFREE - The uPP module is unaffected by an emulation suspend.

    - UPP_EMULATIONMODE_SOFTSTOP - The uPP module stops after completing current DMA burst transaction.

    Return

      None.

  void `UPP_setOperationMode`(uint32_t base, UPP_OperationMode opMode)

    Sets uPP mode of operation.

    This function sets the uPP mode of opeartion. The

    opMode parameter determines whether uPP module should be configured as transmitter or receiver. It should be passed any of the following values:

    - UPP_RECEIVE_MODE - uPP is to be operated in Rx mode.

    - UPP_TRANSMIT_MODE - uPP is to be operated in Tx mode.

    Parameters

      - `base`: is the configuration address of the uPP instance used.

      - `opMode`: is mode of operation for uPP module.

    Return

      None.

  void `UPP_setDataRate`(uint32_t base, UPP_DataRate dataRate)

    Sets uPP data rate mode.

    This function sets the data rate mode for uPP module as single data rate or double data rate mode. It should be passed any of the following values:

    - UPP_DATA_RATE_SDR - uPP is to be operated in single data rate mode.

    - UPP_DATA_RATE_DDR - uPP is to be operated in double data rate mode.

    Parameters

      - `base`: is the configuration address of the uPP instance used.

      - `dataRate`: is the required uPP data rate mode.

    Return

      None.

  void `UPP_setTxSDRInterleaveMode`(uint32_t base, UPP_TxSDRInterleaveMode mode)

    Sets Tx SDR interleave mode for uPP module.

    This function sets the required interleave mode for SDR Tx uPP. It is valid only for Tx SDR mode & not for Rx SDR mode. The

    mode parameter determines whether interleaving should be enabled or disabled for SDR Tx uPP mode. It should be passed any of the following values:

    - UPP_TX_SDR_INTERLEAVE_DISABLE - specifies interleaving is disabled

    - UPP_TX_SDR_INTERLEAVE_ENABLE - specifies interleaving is enabled

    Parameters

      - `base`: is the configuration address of the uPP instance used.

      - `mode`: is the required SDR interleave mode.

    Return

      None.

  void `UPP_setDDRDemuxMode`(uint32_t base, UPP_DDRDemuxMode mode)

    Sets DDR de-multiplexing mode for uPP module.

    This function sets the demultiplexing mode for uPP DDR mode. The

    mode parameter determines whether demuliplexing to enabled or disabled in DDR mode. It should take following values:

    - UPP_DDR_DEMUX_DISABLE - specifies demultiplexing is disabled

    - UPP_DDR_DEMUX_ENABLE - specifies demultiplexing is enabled

    Parameters

      - `base`: is the configuration address of the uPP instance used.

      - `mode`: is the required DDR de-multiplexing mode.

    Return

      None.

  void `UPP_setControlSignalPolarity`(uint32_t base, UPP_SignalPolarity waitPola, UPP_SignalPolarity enablePola, UPP_SignalPolarity startPola)

    Sets control signal polarity for uPP module.

    This function sets the control signal polarity for uPP module. The

    waitPola, enablePola, startPola parameters determines the control signal polarities. Valid values for these parameters are the following:

    - UPP_SIGNAL_POLARITY_HIGH - Signal polarity to be set as active high.

    - UPP_SIGNAL_POLARITY_LOW - Signal polarity to be set as active low.

    Parameters

      - `base`: is the configuration address of the uPP instance used.

      - `waitPola`: is the required wait signal polarity.

      - `enablePola`: is the required enable signal polarity.

      - `startPola`: is the required start signal polarity.

    Return

      None.

  void `UPP_setTxControlSignalMode`(uint32_t base, UPP_SignalMode waitMode)

    Sets the mode for optional control signals for uPP module in Tx mode.

    This function sets the mode for optional control signals in Tx mode for uPP module. The

    waitMode parameter determine whether the wait signal is to be enabled or disabled while uPP is in transmit mode. It can take following values:

    - UPP_SIGNAL_DISABLE - Wait signal will be disabled.

    - UPP_SIGNAL_ENABLE - Wait signal will be enabled.

    Parameters

      - `base`: is the configuration address of the uPP instance used.

      - `waitMode`: is the required mode for wait signal.

    Return

      None.

  void `UPP_setRxControlSignalMode`(uint32_t base, UPP_SignalMode enableMode, UPP_SignalMode startMode)

    Sets the mode for optional control signals for uPP module in Rx mode.

    This function sets the mode for optional control signal mode in Rx mode for uPP module.The

    enableMode & startMode parameter determine whether the enable & start signals are to be enabled or disabled while uPP is in receive mode. These can take following values:

    - UPP_SIGNAL_DISABLE - Signal will be disabled.

    - UPP_SIGNAL_ENABLE - Signal will be enabled.

    Parameters

      - `base`: is the configuration address of the uPP instance used.

      - `enableMode`: is the required mode for enable signal.

      - `startMode`: is the required mode for start signal.

    Return

      None.

  void `UPP_setTxClockDivider`(uint32_t base, uint16_t divider)

    Sets the clock divider when uPP is in Tx mode.

    This function configures the clock rate of uPP when it is operating in Tx mode. The

    divider parameter is the value by which SYSCLK rate is divided to get the desired uPP Tx clock rate.
    Parameters

      - `base`: is the configuration address of the uPP instance used.

      - `divider`: is the value by which PLLSYSCLK (or CPU1.SYSCLK on a dual core device) is divided.

    Return

      None.

  void `UPP_setClockPolarity`(uint32_t base, UPP_ClockPolarity clkPolarity)

    Sets the uPP clock polarity.

    This function sets the uPP clock polarity. The

    clkPolarity parameter in Tx mode determines whether output Tx clock is to be inverted or not, while in Rx mode it determines whether the Rx input clock is to be treated as inverted or not.
    Parameters

      - `base`: is the configuration address of the uPP instance used.

      - `clkPolarity`: is the required clock polarity.

    Return

      None.

  void `UPP_configTxIdleDataMode`(uint32_t base, UPP_TxIdleDataMode config)

    Configures data line behaviour when uPP goes to idle state in Tx mode.

    This function configures the Tx mode data line behaviour in uPP. The

    config determines whether tri-state is enabled or disabled for uPP idlle time. It can take following values:

    - UPP_TX_IDLE_DATA_IDLE - uPP will drive idle values to data lines when it goes to idle mode while operating in Tx mode.

    - UPP_TX_IDLE_DATA_TRISTATED - uPP will tri-state data lines when it goes to idle mode while operating in Tx mode.

    Parameters

      - `base`: is the configuration address of the uPP instance used.

      - `config`: is the required idle mode data line behaviour.

    Return

      None.

  void `UPP_setTxIdleValue`(uint32_t base, uint16_t idleVal)

    Sets idle value to be driven by data line when uPP goes to idle state when operating in Tx mode.

    This function sets idle value to be driven in idle state while uPP is operating in Tx mode. The parameter

    idleVal is the value to be driven when Tx uPP is in idle state.
    Parameters

      - `base`: is the configuration address of the uPP instance used.

      - `idleVal`: is the required idle value to be driven in Tx idle state.

    Return

      None.

  void `UPP_setTxThreshold`(uint32_t base, UPP_ThresholdSize size)

    Sets the I/O transmit threshold.

    This function sets the i/o transmit threshold. The

    size parameter determines the required size for the threshold to reach in transmit buffer before the tranmission begins. It can take following values:

    - UPP_THR_SIZE_64BYTE - Sets the Tx threshold to 64 bytes.

    - UPP_THR_SIZE_128BYTE - Sets the Tx threshold to 128 bytes.

    - UPP_THR_SIZE_256BYTE - Sets the Tx threshold to 256 bytes.

    Parameters

      - `base`: is the configuration address of the uPP instance used.

      - `size`: is the required Tx threshold size in bytes.

    Return

      None.

  void `UPP_enableInterrupt`(uint32_t base, uint16_t intFlags)

    Enables individual uPP module interrupts.

    This function enables uPP module interrupt sources. The

    intFlags parameter can be any of the following values OR’d together:

    - UPP_INT_CHI_DMA_PROG_ERR - DMA Channel I Programming Error

    - UPP_INT_CHI_UNDER_OVER_RUN - DMA Channel I Underrun/Overrun

    - UPP_INT_CHI_END_OF_WINDOW - DMA Channel I End of Window Event

    - UPP_INT_CHI_END_OF_LINE - DMA Channel I End of Line Event

    - UPP_INT_CHQ_DMA_PROG_ERR - DMA Channel Q Programming Error

    - UPP_INT_CHQ_UNDER_OVER_RUN - DMA Channel Q Underrun/Overrun

    - UPP_INT_CHQ_END_OF_WINDOW - DMA Channel Q End of Window Event

    - UPP_INT_CHQ_END_OF_LINE - DMA Channel Q End of Line Event

    Parameters

      - `base`: is the configuration address of the uPP instance used.

      - `intFlags`: is a bit mask of the interrupt sources to be enabled.

    Return

      None.

  void `UPP_disableInterrupt`(uint32_t base, uint16_t intFlags)

    Disables individual uPP module interrupts.

    This function disables uPP module interrupt sources. The

    intFlags parameter can be any of the following values OR’d together:

    - UPP_INT_CHI_DMA_PROG_ERR - DMA Channel I Programming Error

    - UPP_INT_CHI_UNDER_OVER_RUN - DMA Channel I Underrun/Overrun

    - UPP_INT_CHI_END_OF_WINDOW - DMA Channel I End of Window Event

    - UPP_INT_CHI_END_OF_LINE - DMA Channel I End of Line Event

    - UPP_INT_CHQ_DMA_PROG_ERR - DMA Channel Q Programming Error

    - UPP_INT_CHQ_UNDER_OVER_RUN - DMA Channel Q Underrun/Overrun

    - UPP_INT_CHQ_END_OF_WINDOW - DMA Channel Q End of Window Event

    - UPP_INT_CHQ_END_OF_LINE - DMA Channel Q End of Line Event

    Parameters

      - `base`: is the configuration address of the uPP instance used.

      - `intFlags`: is a bit mask of the interrupt sources to be disabled.

    Return

      None.

  uint16_t `UPP_getInterruptStatus`(uint32_t base)

    Gets the current uPP interrupt status for enabled interrupts.

    This function returns the interrupt status of enabled interrupts for the uPP module.

    Parameters

      - `base`: is the configuration address of the uPP instance used.

    Return

      Returns current interrupt status for enabled interrupts, enumerated as a bit field of any of the following values:

      - UPP_INT_CHI_DMA_PROG_ERR - DMA Channel I Programming Error

      - UPP_INT_CHI_UNDER_OVER_RUN - DMA Channel I Underrun/Overrun

      - UPP_INT_CHI_END_OF_WINDOW - DMA Channel I End of Window Event

      - UPP_INT_CHI_END_OF_LINE - DMA Channel I End of Line Event

      - UPP_INT_CHQ_DMA_PROG_ERR - DMA Channel Q Programming Error

      - UPP_INT_CHQ_UNDER_OVER_RUN - DMA Channel Q Underrun/Overrun

      - UPP_INT_CHQ_END_OF_WINDOW - DMA Channel Q End of Window Event

      - UPP_INT_CHQ_END_OF_LINE - DMA Channel Q End of Line Event

  uint16_t `UPP_getRawInterruptStatus`(uint32_t base)

    Gets the current uPP interrupt status for all the interrupts.

    This function returns the interrupt status of all the interrupts for the uPP module.

    Parameters

      - `base`: is the configuration address of the uPP instance used.

    Return

      Returns current interrupt status for all the interrupts, enumerated as a bit field of any of the following values:

      - UPP_INT_CHI_DMA_PROG_ERR - DMA Channel I Programming Error

      - UPP_INT_CHI_UNDER_OVER_RUN - DMA Channel I Underrun/Overrun

      - UPP_INT_CHI_END_OF_WINDOW - DMA Channel I End of Window Event

      - UPP_INT_CHI_END_OF_LINE - DMA Channel I End of Line Event

      - UPP_INT_CHQ_DMA_PROG_ERR - DMA Channel Q Programming Error

      - UPP_INT_CHQ_UNDER_OVER_RUN - DMA Channel Q Underrun/Overrun

      - UPP_INT_CHQ_END_OF_WINDOW - DMA Channel Q End of Window Event

      - UPP_INT_CHQ_END_OF_LINE - DMA Channel Q End of Line Event

  void `UPP_clearInterruptStatus`(uint32_t base, uint16_t intFlags)

    Clears individual uPP module interrupts.

    This function clears uPP module interrupt flags. The

    intFlags parameter can be any of the following values OR’d together:

    - UPP_INT_CHI_DMA_PROG_ERR - DMA Channel I Programming Error

    - UPP_INT_CHI_UNDER_OVER_RUN - DMA Channel I Underrun/Overrun

    - UPP_INT_CHI_END_OF_WINDOW - DMA Channel I End of Window Event

    - UPP_INT_CHI_END_OF_LINE - DMA Channel I End of Line Event

    - UPP_INT_CHQ_DMA_PROG_ERR - DMA Channel Q Programming Error

    - UPP_INT_CHQ_UNDER_OVER_RUN - DMA Channel Q Underrun/Overrun

    - UPP_INT_CHQ_END_OF_WINDOW - DMA Channel Q End of Window Event

    - UPP_INT_CHQ_END_OF_LINE - DMA Channel Q End of Line Event

    Parameters

      - `base`: is the configuration address of the uPP instance used.

      - `intFlags`: is a bit mask of the interrupt sources to be cleared.

    Return

      None.

  void `UPP_enableGlobalInterrupt`(uint32_t base)

    Enables uPP global interrupt.

    This function enables the global interrupt for uPP module which allows uPP to generate interrupts.

    Parameters

      - `base`: is the configuration address of the uPP instance used.

    Return

      None.

  void `UPP_disableGlobalInterrupt`(uint32_t base)

    Disables uPP global interrupt.

    This function disables global interrupt for uPP module which restricts uPP to generate any interrupts.

    Parameters

      - `base`: is the configuration address of the uPP instance used.

    Return

      None.

  bool `UPP_isInterruptGenerated`(uint32_t base)

    Get uPP global interrupt status.

    This function returns whether any of the uPP interrupt is generated.

    Parameters

      - `base`: is the configuration address of the uPP instance used.

    Return

      Returns global interrupt status. It can return following values:

      - true - Interrupt has been generated.

      - false - No interrupt has been generated.

  void `UPP_clearGlobalInterruptStatus`(uint32_t base)

    Clears uPP global interrupt status.

    This function clears global interrupt status for uPP module.

    Parameters

      - `base`: is the configuration address of the uPP instance used.

    Return

      None.

  void `UPP_enableInputDelay`(uint32_t base)

    Enables extra delay on uPP input pins.

    This function enables configurable extra delay on uPP input pins.

    Parameters

      - `base`: is the configuration address of the uPP instance used.

    Return

      None.

  void `UPP_disableInputDelay`(uint32_t base)

    Disables extra delay on uPP input pins.

    This function disables extra delay on uPP input pins.

    Parameters

      - `base`: is the configuration address of the uPP instance used.

    Return

      None.

  void `UPP_setInputDelay`(uint32_t base, UPP_InputDelay delay)

    Configures delay for uPP input pins.

    This function sets input delay for uPP input pins. The

    delay parameter specifies the delay to be introduced to input & clock pins. It can take following values. All the following values lead to 2 cycle delay on clock pin.

    - UPP_INPUT_DLY_4 - 4 cycle delay for data & control pins

    - UPP_INPUT_DLY_6 - 6 cycle delay for data & control pins

    - UPP_INPUT_DLY_9 - 9 cycle delay for data & control pins

    - UPP_INPUT_DLY_14 - 14 cycle delay for data & control pins

    Parameters

      - `base`: is the configuration address of the uPP instance used.

      - `delay`: is the delay to be introduced in input & clock pins.

    Return

      None.

  void `UPP_setDMAReadThreshold`(uint32_t base, UPP_DMAChannel channel, UPP_ThresholdSize size)

    Sets the read threshold for uPP internal DMA channels.

    This function sets the read threshold for DMA channel I or Q. The

    size parameter specifies the read threshold in bytes. It can following values:

    - UPP_THR_SIZE_64BYTE - Sets the DMA read threshold to 64 bytes.

    - UPP_THR_SIZE_128BYTE - Sets the DMA read threshold to 128 bytes.

    - UPP_THR_SIZE_256BYTE - Sets the DMA read threshold to 256 bytes.

    Parameters

      - `base`: is the configuration address of the uPP instance used.

      - `channel`: is the required uPP internal DMA channel to be configured.

      - `size`: is the required read threshold size in bytes.

    Return

      None.

  void `UPP_setDMADescriptor`(uint32_t base, UPP_DMAChannel channel, const UPP_DMADescriptor *const desc)

    Sets uPP Internal DMA Channel Descriptors.

    This function configures DMA descriptors for either channel I or Q which includes starting address of DMA transfer, line count, byte count & line offset address for DMA transfer. In Tx mode, starting address is the address of data buffer to be transmitted while in Rx mode it is the address of buffer where recieved data is to be copied. The

    channel parameter can take any of the following values:

    - UPP_DMA_CHANNEL_I - uPP DMA channel I

    - UPP_DMA_CHANNEL_Q - uPP DMA channel Q

    Parameters

      - `base`: is the configuration address of the uPP instance used.

      - `channel`: is the required uPP internal DMA channel to be configured.

      - `desc`: is the required DMA descriptor setting.

    Return

      None.

  void `UPP_getDMAChannelStatus`(uint32_t base, UPP_DMAChannel channel, UPP_DMAChannelStatus *const status)

    Returns current status of uPP internal DMA channel transfer.

    This function returns the current status for either channel I or Q active transfer which includes current DMA transfer address, current line & byte number of the transfer. The

    channel parameter can take any of the following values:

    - UPP_DMA_CHANNEL_I - uPP DMA channel I

    - UPP_DMA_CHANNEL_Q - uPP DMA channel Q

    Parameters

      - `base`: is the configuration address of the uPP instance used.

      - `channel`: is the required uPP internal DMA channel.

      - `status`: is current status for DMA channel returned by the api.

    Return

      None.

  bool `UPP_isDescriptorPending`(uint32_t base, UPP_DMAChannel channel)

    Returns Pend status of uPP internal DMA channel descriptor.

    This function returns the Pend status for DMA channel I or Q descriptor which specifies whether previous descriptor is copied from shadow register to original register & new descriptor can be programmed or the previous descriptor is still pending & new descriptor cannot be programmed. The

    channel parameter can take following values:

    - UPP_DMA_CHANNEL_I - uPP DMA channel I

    - UPP_DMA_CHANNEL_Q - uPP DMA channel Q

    Parameters

      - `base`: is the configuration address of the uPP instance used.

      - `channel`: is the required uPP internal DMA channel.

    Return

      Returns pend status of DMA channel I descriptor. It can return following values:

      - true - specifies that writing of new DMA descriptor is not allowed.

      - false - specifies that writing of new DMA descriptor is allowed.

  bool `UPP_isDescriptorActive`(uint32_t base, UPP_DMAChannel channel)

    Returns active status of uPP Internal DMA Channel descriptor.

    This function returns the active status of uPP internal DMA channel I or Q descriptor which specifies whether the descriptor is being currently active(transferring data) or idle. The

    channel parameter can take following values:

    - UPP_DMA_CHANNEL_I - uPP DMA channel I

    - UPP_DMA_CHANNEL_Q - uPP DMA channel Q

    Parameters

      - `base`: is the configuration address of the uPP instance used.

      - `channel`: is the required uPP internal DMA channel to be configured.

    Return

      Returns active status of uPP internal DMA channel descriptor. It can return following values:

      - true - specifies that desciptor is currently active.

      - false - specifies that desciptor is currently idle.

  uint16_t `UPP_getDMAFIFOWatermark`(uint32_t base, UPP_DMAChannel channel)

    Returns watermark for FIFO block count for uPP internal DMA Channel.

    This function returns watermark for FIFO block count for uPP internal DMA Channel I or Q based on

    channel parameter. The channel paramter can take following values:

    - UPP_DMA_CHANNEL_I - uPP DMA channel I

    - UPP_DMA_CHANNEL_Q - uPP DMA channel Q

    Parameters

      - `base`: is the configuration address of the uPP instance used.

      - `channel`: is the required uPP internal DMA channel.

    Return

      Returns active status of DMA channel I descriptor. It can return following values:

      - true - specifies that desciptor is currently active.

      - false - specifies that desciptor is currently idle.

  void `UPP_readRxMsgRAM`(uint32_t rxBase, uint16_t array[], uint16_t length, uint16_t offset)

    Reads the received data from uPP Rx MSG RAM.

    This function reads the received data from uPP Rx MSG RAM. The sum of parameters

    length & offset should be less than the size of the Rx MSG RAM.
    Parameters

      - `rxBase`: is the uPP Rx MSG RAM base address.

      - `array`: is the address of the array of words to be transmitted.

      - `length`: is the number of words in the array to be transmitted.

      - `offset`: is offset in Rx Data RAM from where data read will start.

    Return

      None.

  void `UPP_writeTxMsgRAM`(uint32_t txBase, const uint16_t array[], uint16_t length, uint16_t offset)

    Writes the data to be transmitted in uPP Tx MSG RAM.

    This function writes the data to be transmitted to uPP Rx MSG RAM. The sum of parameters

    length & offset should be less than the size of the Tx MSG RAM.
    Parameters

      - `txBase`: is the uPP Tx MSG RAM base address.

      - `array`: is the address of the array of words to be transmitted.

      - `length`: is the number of words in the array to be transmitted.

      - `offset`: is offset in Tx Data RAM from where data write will start.

    Return

      None.

  struct `UPP_DMADescriptor`
    #include <upp.h>

    Values that can be passed to UPP_setDMADescriptor() as desc parameter.

  struct `UPP_DMAChannelStatus`
    #include <upp.h>

    Values that can be returned by UPP_getDMAChannelStatus() as uPP internal DMA channel current status.

The UPP API includes functions to enable/disable uPP module, perform software reset, configure uPP as Transmitter or Receiver, set data rate to SDR or DDR,set interleaving & demultiplexing configurations, set control signal polarities, enable/disable optional control signals, set Tx clock value & polarity, configure idle Tx dataline values, enable/disable, clear & get status for uPP interrupts.

The code for this module is contained in driverlib/upp.c, with driverlib/upp.h containing the API declarations for use by applications.