Synergy Software Package User's Manual

Driver for internal analog connections. More...

Functions

ssp_err_t R_ANALOG_CONNECT_Init (analog_connect_cfg_t const *const p_cfg)
 
ssp_err_t R_ANALOG_CONNECT_Connect (analog_connect_t const connection)
 
ssp_err_t R_ANALOG_CONNECT_ConnectMultiple (analog_connect_table_t const *const p_table)
 
ssp_err_t R_ANALOG_CONNECT_VersionGet (ssp_version_t *const p_version)
 

Detailed Description

Driver for internal analog connections.

Summary

Extends Analog Connect Interface.

This module implements the Analog Connect Interface.

Function Documentation

◆ R_ANALOG_CONNECT_Connect()

ssp_err_t R_ANALOG_CONNECT_Connect ( analog_connect_t const  connection)

Makes an internal analog connection.

For ACMPHS connections, output and interrupts are disabled while the connection is configured, then the output and interrupts are restored to their original state. Since this function enables output if it was enabled before, R_ACMPHS_Close() should not be called during this function.

ACMPLP connections must be made prior to enabling output.

OPAMP connections can be reconfigured while the OPAMP is operating. If an OPAMP connection is already set and a new connection is made, the new connection overwrites the existing connection. OPAMP connections can be OR'd together if they are for the same signal:

  • Valid example: ANALOG_CONNECT_OPAMP0_PLUS_TO_PIN_AMP0_PLUS | ANALOG_CONNECT_OPAMP0_PLUS_TO_PIN_AMP1_PLUS
    • Both start with ANALOG_CONNECT_OPAMP0_PLUS
  • Invalid example: ANALOG_CONNECT_OPAMP0_PLUS_TO_PIN_AMP0_PLUS | ANALOG_CONNECT_OPAMP0_MINUS_TO_PIN_AMP0_MINUS
    • Do not mix PLUS and MINUS
  • Invalid example: ANALOG_CONNECT_OPAMP0_PLUS_TO_PIN_AMP0_PLUS | ANALOG_CONNECT_OPAMP1_PLUS_TO_PIN_AMP1_PLUS
    • Do not mix channels 0 and 1

If AVCC0 < 2.7 V, MOCO must be enabled to make OPAMP connections because the internal OPAMP switches require a charge pump, and the MOCO is required for charge pump operation. When using the charge pump for the amplifier:

  • Turn on no more than a total of 5 connections for OPAMP0.
  • Turn on no more than a total of 5 connections for OPAMP1.
  • Turn on no more than a total of 2 connections for OPAMP2.
Return values
SSP_SUCCESSConnection made.
Returns
See Common Error Codes or functions called by this function for other possible return codes. This function calls:

◆ R_ANALOG_CONNECT_ConnectMultiple()

ssp_err_t R_ANALOG_CONNECT_ConnectMultiple ( analog_connect_table_t const *const  p_table)

Makes all connections in the table.

See R_ANALOG_CONNECT_Connect() for modules specific usage notes regarding connections.

Return values
SSP_SUCCESSAll connections made.
SSP_ERR_ASSERTIONData table pointer is NULL or size is 0.
Returns
See Common Error Codes or functions called by this function for other possible return codes. This function calls:

◆ R_ANALOG_CONNECT_Init()

ssp_err_t R_ANALOG_CONNECT_Init ( analog_connect_cfg_t const *const  p_cfg)

Placeholder function for analog connection initialization code. Currently unused.

Return values
SSP_SUCCESSInit successful.

◆ R_ANALOG_CONNECT_VersionGet()

ssp_err_t R_ANALOG_CONNECT_VersionGet ( ssp_version_t *const  p_version)

Gets the API and code version. Implements analog_connect_api_t::versionGet().

Return values
SSP_SUCCESSVersion information available in p_version.
SSP_ERR_ASSERTIONThe parameter p_version is NULL.

Return the version number