@@ -91,28 +91,28 @@
* \ref group_csdidac_changelog also describes the impact of changes to
* your code.
*
-* The CSD HW block enables the multiple sensing capabilities on PSoC devices
-* including the self-cap and mutual-cap capacitive touch sensing solution,
-* 10-bit ADC, IDAC, and Comparator. The CSD driver is a low-level
-* peripheral driver, a wrapper to manage access to the CSD HW block.
-* Any middleware access to the CSD HW block is through the CSD Driver.
-*
-* The CSD HW block can support only one function at a time. However, all
-* supported functionality (like CapSense, CSDADC, CSDIDAC, etc.) can be
-* time-multiplexed in a design. I.e. you can save the existing state
-* of the CapSense middleware, restore the state of the CSDIDAC middleware,
+* The CSD HW block enables the multiple sensing capabilities on PSoC devices
+* including the self-cap and mutual-cap capacitive touch sensing solution,
+* 10-bit ADC, IDAC, and Comparator. The CSD driver is a low-level
+* peripheral driver, a wrapper to manage access to the CSD HW block.
+* Any middleware access to the CSD HW block is through the CSD Driver.
+*
+* The CSD HW block can support only one function at a time. However, all
+* supported functionality (like CapSense, CSDADC, CSDIDAC, etc.) can be
+* time-multiplexed in a design. I.e. you can save the existing state
+* of the CapSense middleware, restore the state of the CSDIDAC middleware,
* perform DAC operations, and then switch back to the CapSense functionality.
-* For more details and code examples, refer to the description of the
+* For more details and code examples, refer to the description of the
* Cy_CSDIDAC_Save() and Cy_CSDIDAC_Restore() functions.
-*
+*
* \image html capsense_solution.png "CapSense Solution" width=800px
* \image latex capsense_solution.png
-*
-* This section describes only the CSDIDAC middleware. Refer to the corresponding
+*
+* This section describes only the CSDIDAC middleware. Refer to the corresponding
* sections for documentation of other middleware supported by the CSD HW block.
* The CSDIDAC library is designed to be used with the CSD driver.
-* The application program does not need to interact with the CSD driver
-* and/or other drivers such as GPIO or SysClk directly. All of that is
+* The application program does not need to interact with the CSD driver
+* and/or other drivers such as GPIO or SysClk directly. All of that is
* configured and managed by the middleware.
*
* The Cy_CSDIDAC API is described in the following sections:
@@ -125,13 +125,13 @@
* \section section_csdidac_quick_start Quick Start Guide
********************************************************************************
*
-* Cypress CSDIDAC middleware can be used in various Development Environments
+* The CSDIDAC middleware can be used in various Development Environments
* such as ModusToolbox, MBED, etc. Refer to the \ref section_csdidac_toolchain.
* The quickest way to get started is using the Code Examples.
-* Cypress Semiconductor continuously extends its portfolio of the code examples
+* The continually expanding portfolio of the code examples is available
* at the Cypress Semiconductor website
-* and at the
-* Cypress Semiconductor GitHub.
+* and on
+* GitHub.
*
* This quick start guide assumes that the environment is configured to use the
* PSoC 6 Peripheral Driver Library(psoc6pdl) for development and the
@@ -145,7 +145,7 @@
* \note
* Put the CSDIDAC name to the Alias field of the CSD resource if the
* Device Configurator is used.
-*
+*
* 2. Include cy_csdidac.h to get access to all CSDIDAC API and cy_pdl.h to get
* access to API of peripheral drivers according to the example below:
* \snippet csdidac/snippet/main.c snippet_required_includes
@@ -169,9 +169,9 @@
* with the following parameters:
* 1. Device VDDA: 3.3V.
* 2. Device Peri Clock frequency: 48MHz.
-* 3. IDAC A is sourcing current of 50 uA to GPIO pin P6[2].
-* 4. IDAC B is sinking current of 0.5uA from GPIO pin P6[3].
-*
+* 3. IDAC A is sourcing current of 50 uA to GPIO pin P0[4].
+* 4. IDAC B is sinking current of 0.5uA from GPIO pin P0[5].
+*
* There are two methods for the CSDIDAC Middleware configuration:
* 1. \ref subsection_csdidac_mtb_configuring
* 2. \ref subsection_csdidac_manual_configuring
@@ -185,7 +185,7 @@
* Device Configurator Tool provides the user interface to set up and
* automatically generate the initialization code (including analog routing) and
* configuration structures.
-*
+*
* Manual implementation of the initialization code (including analog routing)
* and configuration structures is recommended for expert Users only. This will
* include the code for the following settings which in case of the
@@ -238,7 +238,7 @@
* * The Peripheral Clock Divider assignment and analog routing are parts of
* the init_cycfg_all() routine. Place the call of the init_cycfg_all() function
* before using any CSDIDAC API functions to ensure initialization of all
-* external resources required for the CSDIDAC operation.
+* external resources required for the CSDIDAC operation.
* Refer to the main() routine code snippet in
* \ref section_csdidac_quick_start
* * The CSDIDAC configuration structure declaration in the
@@ -268,7 +268,7 @@
* is used.
* Otherwise, ensure the CSDIDAC Middleware is included in your project.
* 2. Define the CSD HW block base address. See the code example below:
-* \snippet csdidac/snippet/main.c snippet_csd_hw_definition
+* \snippet csdidac/snippet/main.c snippet_csd_hw_definition
* 3. Declare the CSD HW driver context structure and initialize the
* lockKey field with the CY_CSD_NONE_KEY value. See the code example below:
* \snippet csdidac/snippet/main.c snippet_csd_context_declaration
@@ -282,16 +282,26 @@
* \snippet csdidac/snippet/main.c snippet_Cy_CSDIDAC_Clock_Assignment
* 6. Set the configuration of the HSIOM_AMUX_SPLIT_CTL switches to route signal
* from CSD HW block to the pins configured as the CSDIDAC output channels.
-* The AMUX_SPLIT_CTL[4] switches are closed to connect
-* port P6 with the CSD HW block. Refer to the
+*
+* The AMUX bus has segments that are separated with the HSIOM_AMUX_SPLIT_CTL switches.
+* The code below closes the AMUX_SPLIT_CTL switches, which route the IDAC output
+* signal from the CSD block to the pin. In this example, IDAC output channels
+* are assigned to the P0[4] and P[5] pins. The AMUX_SPLIT_CTL[5] and AMUX_SPLIT_CTL[6]
+* switches must be closed in the PSoC6 device. The P0[4] and P[5] pins in the
+* PSoC4 device belong to the AMUX bus segment, which is connected to the CSD block
+* directly. In this case, the AMUX_SPLIT_CTL switches are not closed.
+* Refer to the
* Technical Reference Manual
* (TRM) for more information regarding the analog interconnection.
* See the code example below and refer to the main() routine code snippet in
* \ref section_csdidac_quick_start
* \snippet csdidac/snippet/main.c snippet_Cy_CSDIDAC_Amux_Configuration
* \note
-* Some CSDIDAC configurations are restricted. The CSD personality has a
-* mechanism to prevent writing an invalid configuration. If CSDIDAC is manually
+* If you use a KIT, check on the schematics, if pins P0[4] and P0[5] are
+* free. If not, use some other pins and update the AMUX_SPLIT_CTL registers.
+* \note
+* Some CSDIDAC configurations are restricted. The CSD personality has a
+* mechanism to prevent writing an invalid configuration. If CSDIDAC is manually
* created, avoid the following combinations:
* * both IDAC channels are disabled
* * one IDAC channel is disabled and another channel is joined to it
@@ -311,24 +321,25 @@
********************************************************************************
* \subsection group_csdidac_low_power_design Low power design
********************************************************************************
-* The CSD HW block and CSDIDAC middleware can operate in CPU active and
-* CPU sleep power modes. It is also
+* The CSD HW block and CSDIDAC middleware can operate in CPU active and
+* CPU sleep power modes. It is also
* possible to switch between low power and ultra low power system modes.
-* In System Deep Sleep and Hibernate power modes, the CSD HW block is powered off and
+* In System Deep Sleep and Hibernate power modes, the CSD HW block is powered off and
* CSDIDAC operations are not performed. Before entering CPU / System Deep Sleep,
-* disable CSDIDAC output current generation. If output
+* disable CSDIDAC output current generation. If output
* currents are not disabled, a CPU Deep Sleep transition will fail.
-* When the device wakes up from CPU / System Deep Sleep, the CSD HW block resumes operation
-* without the need for re-initialization and the CSDIDAC operations can be
-* continued with configuration that was set before a CPU / System Deep Sleep transition.
-* When the device wakes up from Hibernate power mode, the CSD HW block
+* When the device wakes up from CPU / System Deep Sleep, the CSD HW block resumes operation
+* without the need for re-initialization and the CSDIDAC operations can be
+* continued with configuration that was set before a CPU / System Deep Sleep transition.
+* When the device wakes up from Hibernate power mode, the CSD HW block
* does not retain the configuration and CSDIDAC requires re-initialization.
*
* \note
-* 1. Analog start up time for the CSD HW block is 25 us. Initiate
-* any kind of operation only after 25 us from System Deep Sleep / Hibernate exit.
+* 1. Analog start up time for the CSD HW block is 25 us for PSoC6 devices and
+* 10 us for PSoC4 devices. Initiate any kind of operation only after 25 us
+* for PSoC6 devices and 10 us for PSoC4 devices from System Deep Sleep / Hibernate exit.
*
-* 2. Entering CPU Deep Sleep mode does not mean the device enters
+* 2. Entering CPU Deep Sleep mode does not mean the device enters
* System Deep Sleep. For more detail about switching to System Deep Sleep,
* refer to the device TRM.
*
@@ -340,18 +351,18 @@
* The CSD HW block can operate in CPU sleep mode. The user can start CSDIDAC
* and move CPU into sleep mode to reduce power consumption. After wake-up CPU
* from sleep, the user can perform other operations, e.g. disable IDACs.
-* Then, the user configures the CSDIDAC middleware as described in
-* \ref section_csdidac_configuration, and updates the main() routine with
-* the following code:
+* Then, the user configures the CSDIDAC middleware as described in
+* \ref section_csdidac_configuration, and updates the main() routine with
+* the following code:
* \snippet csdidac/snippet/main.c snippet_Cy_CSDIDAC_Sleep
*
* Deep Sleep mode
* To use the CSDIDAC middleware in CPU / System Deep Sleep mode, the user configures
-* a wake-up source (e.g. a pin, WDT, LPC or another entities, that are active
-* in CPU / System Deep Sleep mode), configures the CSDIDAC middleware as described in
-* \ref section_csdidac_configuration, configures CSDIDAC and other drivers' and
-* middleware's (if presented) Deep Sleep Callback structures, registers
-* callbacks, and updates the main() routine with the following code:
+* a wake-up source (e.g. a pin, WDT, LPC or another entities, that are active
+* in CPU / System Deep Sleep mode), configures the CSDIDAC middleware as described in
+* \ref section_csdidac_configuration, configures CSDIDAC and other drivers' and
+* middleware's (if present) Deep Sleep Callback structures, registers
+* callbacks, and updates the main() routine with the following code:
* \snippet csdidac/snippet/main.c snippet_CSDIDAC_DeepSleep_structures
* \snippet csdidac/snippet/main.c snippet_Cy_CSDIDAC_DeepSleep
*
@@ -366,9 +377,9 @@
* \section section_csdidac_toolchain Supported Software and Tools
********************************************************************************
*
-* This version of the CSDIDAC Middleware was validated for compatibility
+* This version of the CSDIDAC Middleware was validated for compatibility
* with the following Software and Tools:
-*
+*
*
*
*
Software and Tools
@@ -376,19 +387,27 @@
*
*
*
ModusToolbox Software Environment
-*
2.0
+*
2.1
*
*
*
- ModusToolbox Device Configurator
-*
2.0
+*
2.1
*
*
-*
- ModusToolbox CSD Personality in Device Configurator
+*
- ModusToolbox CSD Personality for PSoC4 devices in Device Configurator
+*
1.0
+*
+*
+*
- ModusToolbox CSD Personality for PSoC6 devices in Device Configurator
*
2.0
*
*
+*
PSoC4 Peripheral Driver Library (PDL)
+*
1.0.0
+*
+*
*
PSoC6 Peripheral Driver Library (PDL)
-*
1.2.0
+*
1.5.0
*
*
*
GCC Compiler
@@ -403,8 +422,8 @@
*
6.11
*
*
-*
MBED OS
-*
5.13.1
+*
MBED OS (only for PSoC6)
+*
5.15.1
*
*
*
FreeRTOS
@@ -445,7 +464,7 @@
*
*
11.4
*
A
-*
Do not perform a conversion between the pointer to an object
+*
Do not perform a conversion between the pointer to an object
* and an integer type.
*
Such a conversion is performed with CSDIDAC context
* in the DeepSleepCallback() function.
@@ -455,8 +474,8 @@
*
1.2
*
R
*
Constant: De-reference of the NULL pointer.
-*
These violations are reported as a result of using
-* offset macros of the CSD Driver with corresponding documented
+*
These violations are reported as a result of using
+* offset macros of the CSD Driver with corresponding documented
* violation 20.6. Refer to the CSD Driver API Reference Guide.
*
*
@@ -471,31 +490,40 @@
*
*
Version
Changes
Reason for Change
*
+*
2.10
+*
Added the support of PSoC 4 CapSense Forth Generation devices
+*
Devices support
+*
+*
+*
Minor documentation update
+*
Documentation cleanup
+*
+*
*
2.0
-*
The joining two IDAC channels option is added to increase
+*
The joining two IDAC channels option is added to increase
* the maximum CSDIDAC output current
*
Feature enchancement
*
*
-*
The cy_stc_csdidac_config_t structure is changed: the periClk field
-* replaced with cpuClk, busOnlyA and busOnlyB fields replaced with
+*
The cy_stc_csdidac_config_t structure is changed: the periClk field
+* replaced with cpuClk, busOnlyA and busOnlyB fields replaced with
* configA and configB fields respectively, the field order is changed.
* The \ref cy_en_csdidac_channel_config_t enumeration type is added.
*
User experience improvement
*
*
-*
The \ref CY_CSDIDAC_HW_FAILURE and
+*
The \ref CY_CSDIDAC_HW_FAILURE and
* the \ref CY_CSDIDAC_BAD_CONFIGURATION return status cases are added
* to the \ref cy_en_csdidac_status_t enumeration type
*
User experience improvement
*
*
-*
The \ref CY_CSDIDAC_AB choosing case for both IDACs is added
+*
The \ref CY_CSDIDAC_AB choosing case for both IDACs is added
* to the \ref cy_en_csdidac_choice_t enumeration type
*
Feature enchancement
*
*
-*
The CSDIDAC MW sources are enclosed with the conditional compilation to
+*
The CSDIDAC MW sources are enclosed with the conditional compilation to
* ensure a successful compilation for non-CapSense-capable devices
@@ -606,7 +676,7 @@
#include "cy_device_headers.h"
#include "cy_csd.h"
-#if defined(CY_IP_MXCSDV2)
+#if (defined(CY_IP_MXCSDV2) || defined(CY_IP_M0S8CSDV2))
/* The C binding of definitions to build with the C++ compiler. */
#ifdef __cplusplus
@@ -622,21 +692,24 @@ extern "C" {
#define CY_CSDIDAC_MW_VERSION_MAJOR (2)
/** Middleware minor version */
-#define CY_CSDIDAC_MW_VERSION_MINOR (0)
+#define CY_CSDIDAC_MW_VERSION_MINOR (10)
+
+/** Middleware version */
+#define CY_CSDIDAC_MW_VERSION (210)
/** CSDIDAC ID. The user can identify the CSDIDAC middleware error codes by this macro. */
#define CY_CSDIDAC_ID (CY_PDL_DRV_ID(0x44u))
-/**
-* The CSDIDAC max code value. The user provides the code
-* parameter for the Cy_CSDIDAC_OutputEnableExt() function
+/**
+* The CSDIDAC max code value. The user provides the code
+* parameter for the Cy_CSDIDAC_OutputEnableExt() function
* in the range from 0u to CY_CSDIDAC_MAX_CODE.
*/
#define CY_CSDIDAC_MAX_CODE (127u)
-/**
-* The CSDIDAC max output current value. The user provides
-* the value of the current parameter for the Cy_CSDIDAC_OutputEnable()
+/**
+* The CSDIDAC max output current value. The user provides
+* the value of the current parameter for the Cy_CSDIDAC_OutputEnable()
* function in range from 0 to +/-(CY_CSDIDAC_MAX_CURRENT_NA).
*/
#define CY_CSDIDAC_MAX_CURRENT_NA (609600uL)
@@ -654,28 +727,28 @@ extern "C" {
/** CSDIDAC return enumeration type */
typedef enum
{
- CY_CSDIDAC_SUCCESS = (0u),
+ CY_CSDIDAC_SUCCESS = (0u),
/**< The operation executed successfully. */
CY_CSDIDAC_BAD_PARAM = (CY_CSDIDAC_ID + (uint32_t)CY_PDL_STATUS_ERROR + 1u),
- /**<
- * An input parameter is invalid.
+ /**<
+ * An input parameter is invalid.
* The user checks whether all
* the input parameters are valid.
*/
CY_CSDIDAC_HW_BUSY = (CY_CSDIDAC_ID + (uint32_t)CY_PDL_STATUS_ERROR + 2u),
- /**<
- * The CSD HW block is busy,
- * i.e. any of current channel (A or B)
- * is enabled.
+ /**<
+ * The CSD HW block is busy,
+ * i.e. any of current channel (A or B)
+ * is enabled.
*/
CY_CSDIDAC_HW_LOCKED = (CY_CSDIDAC_ID + (uint32_t)CY_PDL_STATUS_ERROR + 3u),
- /**<
- * The CSD HW block is acquired and
- * locked by other middleware
- * or application. The CSDIDAC
- * middleware waits for
+ /**<
+ * The CSD HW block is acquired and
+ * locked by other middleware
+ * or application. The CSDIDAC
+ * middleware waits for
* the CSD HW block release
- * to acquire it for use.
+ * to acquire it for use.
*/
CY_CSDIDAC_HW_FAILURE = (CY_CSDIDAC_ID + (uint32_t)CY_PDL_STATUS_ERROR + 4u),
/**<
@@ -706,14 +779,14 @@ typedef enum
} cy_en_csdidac_status_t;
/**
-* The CSDIDAC output current LSB enumeration type. The user can choose
+* The CSDIDAC output current LSB enumeration type. The user can choose
* LSB when the Cy_CSDIDAC_OutputEnableExt() function is called and
-* can check which LSB was chosen by the Cy_CSDIDAC_OutputEnable()
+* can check which LSB was chosen by the Cy_CSDIDAC_OutputEnable()
* function in the cy_stc_csdidac_context_t structure.
*/
typedef enum
-{
+{
CY_CSDIDAC_LSB_37_IDX = 0u, /**< Index for 37.5 nA LSB */
CY_CSDIDAC_LSB_75_IDX = 1u, /**< Index for 75.0 nA LSB */
CY_CSDIDAC_LSB_300_IDX = 2u, /**< Index for 0.3 uA LSB */
@@ -723,9 +796,9 @@ typedef enum
}cy_en_csdidac_lsb_t;
/**
-* The CSDIDAC polarity enumeration type. The user can choose the polarity
-* when the Cy_CSDIDAC_OutputEnableExt() function is called and can
-* check which polarity was chosen by the Cy_CSDIDAC_OutputEnable()
+* The CSDIDAC polarity enumeration type. The user can choose the polarity
+* when the Cy_CSDIDAC_OutputEnableExt() function is called and can
+* check which polarity was chosen by the Cy_CSDIDAC_OutputEnable()
* function in the cy_stc_csdidac_context_t structure.
*/
typedef enum
@@ -735,8 +808,8 @@ typedef enum
}cy_en_csdidac_polarity_t;
/**
-* The CSDIDAC channel enabling enumeration type. The user can check which
-* channel (A or B or both) is currently enabled
+* The CSDIDAC channel enabling enumeration type. The user can check which
+* channel (A or B or both) is currently enabled
* in the cy_stc_csdidac_context_t structure.
*/
typedef enum
@@ -746,8 +819,8 @@ typedef enum
}cy_en_csdidac_state_t;
/**
-* The CSDIDAC choosing enumeration type. The user can choose channel A or B
-* to operate with the Cy_CSDIDAC_OutputEnableExt(), Cy_CSDIDAC_OutputDisable(),
+* The CSDIDAC choosing enumeration type. The user can choose channel A or B
+* to operate with the Cy_CSDIDAC_OutputEnableExt(), Cy_CSDIDAC_OutputDisable(),
* or Cy_CSDIDAC_OutputEnable() functions.
*/
typedef enum
@@ -758,7 +831,7 @@ typedef enum
} cy_en_csdidac_choice_t;
/**
-* The CSDIDAC channel configuration defines either disabled or enabled with
+* The CSDIDAC channel configuration defines either disabled or enabled with
* specific routing.
*/
typedef enum
@@ -1077,7 +1150,7 @@ __STATIC_INLINE bool Cy_CSDIDAC_IsIdacConfigValid(const cy_stc_csdidac_config_t
}
#endif /* __cplusplus */
-#endif /* CY_IP_MXCSDV2 */
+#endif /* (defined(CY_IP_MXCSDV2) || defined(CY_IP_M0S8CSDV2)) */
#endif /* CY_CSDIDAC_H */
diff --git a/docs/csdidac_api_reference_manual/html/IFXCYP_one-line.png b/docs/csdidac_api_reference_manual/html/IFXCYP_one-line.png
new file mode 100644
index 0000000..c6d2b8e
Binary files /dev/null and b/docs/csdidac_api_reference_manual/html/IFXCYP_one-line.png differ
diff --git a/docs/csdidac_api_reference_manual/html/annotated.html b/docs/csdidac_api_reference_manual/html/annotated.html
index 27d95a2..139b346 100644
--- a/docs/csdidac_api_reference_manual/html/annotated.html
+++ b/docs/csdidac_api_reference_manual/html/annotated.html
@@ -6,7 +6,7 @@
-Cypress CSDIDAC Middleware Library 2.0: Data Structures
+CSDIDAC Middleware Library 2.10: Data Structures
@@ -28,9 +28,9 @@
-
+
-
Cypress CSDIDAC Middleware Library 2.0
+
CSDIDAC Middleware Library 2.10
@@ -97,7 +97,7 @@
- Generated for Cypress CSDIDAC Middleware Library 2.0 by Cypress Semiconductor Corporation.
+ Generated for CSDIDAC Middleware Library 2.10 by Cypress Semiconductor Corporation.
All rights reserved.
diff --git a/docs/csdidac_api_reference_manual/html/classes.html b/docs/csdidac_api_reference_manual/html/classes.html
index 4d31885..47a6dd8 100644
--- a/docs/csdidac_api_reference_manual/html/classes.html
+++ b/docs/csdidac_api_reference_manual/html/classes.html
@@ -6,7 +6,7 @@
-Cypress CSDIDAC Middleware Library 2.0: Data Structure Index
+CSDIDAC Middleware Library 2.10: Data Structure Index
@@ -28,9 +28,9 @@
-
+
-
Cypress CSDIDAC Middleware Library 2.0
+
CSDIDAC Middleware Library 2.10
@@ -99,7 +99,7 @@
- Generated for Cypress CSDIDAC Middleware Library 2.0 by Cypress Semiconductor Corporation.
+ Generated for CSDIDAC Middleware Library 2.10 by Cypress Semiconductor Corporation.
All rights reserved.
diff --git a/docs/csdidac_api_reference_manual/html/csdidac_config.png b/docs/csdidac_api_reference_manual/html/csdidac_config.png
index 2a13cca..eae034d 100644
Binary files a/docs/csdidac_api_reference_manual/html/csdidac_config.png and b/docs/csdidac_api_reference_manual/html/csdidac_config.png differ
diff --git a/docs/csdidac_api_reference_manual/html/cypress_logo.png b/docs/csdidac_api_reference_manual/html/cypress_logo.png
deleted file mode 100644
index ac9ba09..0000000
Binary files a/docs/csdidac_api_reference_manual/html/cypress_logo.png and /dev/null differ
diff --git a/docs/csdidac_api_reference_manual/html/doxygen_style.css b/docs/csdidac_api_reference_manual/html/doxygen_style.css
index a3ebbb0..4b48168 100644
--- a/docs/csdidac_api_reference_manual/html/doxygen_style.css
+++ b/docs/csdidac_api_reference_manual/html/doxygen_style.css
@@ -1488,7 +1488,7 @@ tr.heading h2 {
*/
/* cypress logo */
-img[src="cypress_logo.png"]{
+img[src="IFXCYP_one-line.png"]{
height:75px;
/*float: right;*/
}
diff --git a/docs/csdidac_api_reference_manual/html/functions.html b/docs/csdidac_api_reference_manual/html/functions.html
index 03eed22..73d4362 100644
--- a/docs/csdidac_api_reference_manual/html/functions.html
+++ b/docs/csdidac_api_reference_manual/html/functions.html
@@ -6,7 +6,7 @@
-Cypress CSDIDAC Middleware Library 2.0: Data Fields
+CSDIDAC Middleware Library 2.10: Data Fields
@@ -28,9 +28,9 @@
-
+
-
Cypress CSDIDAC Middleware Library 2.0
+
CSDIDAC Middleware Library 2.10
@@ -145,7 +145,7 @@
- Generated for Cypress CSDIDAC Middleware Library 2.0 by Cypress Semiconductor Corporation.
+ Generated for CSDIDAC Middleware Library 2.10 by Cypress Semiconductor Corporation.
All rights reserved.
- Generated for Cypress CSDIDAC Middleware Library 2.0 by Cypress Semiconductor Corporation.
+ Generated for CSDIDAC Middleware Library 2.10 by Cypress Semiconductor Corporation.
All rights reserved.
- Generated for Cypress CSDIDAC Middleware Library 2.0 by Cypress Semiconductor Corporation.
+ Generated for CSDIDAC Middleware Library 2.10 by Cypress Semiconductor Corporation.
All rights reserved.
The CSDIDAC middleware is the Cypress IDAC solution that uses the CSD HW block. Any GPIO that can be connected to AMUX-A/B (refer to the particular device datasheet for information) can be an CSDIDAC output under software control. The CSD HW block is mainly used to implement the touch sense applications and proximity sensors (refer to the CapSense Middleware API Reference Guide), but can also be used to implement the IDAC, which is especially useful for the devices that do not include another hardware option to implement IDAC.
+
The CSDIDAC middleware is the IDAC solution that uses the CSD HW block. Any GPIO that can be connected to AMUX-A/B (refer to the particular device datasheet for information) can be an CSDIDAC output under software control. The CSD HW block is mainly used to implement the touch sense applications and proximity sensors (refer to the CapSense Middleware API Reference Guide), but can also be used to implement the IDAC, which is especially useful for the devices that do not include another hardware option to implement IDAC.
Features:
A two-channel IDAC with the 7-bit resolution.
The IDAC A and IDAC B channels can be enabled/disabled independently.
@@ -130,7 +130,7 @@
Quick Start Guide
-
Cypress CSDIDAC middleware can be used in various Development Environments such as ModusToolbox, MBED, etc. Refer to the Supported Software and Tools. The quickest way to get started is using the Code Examples. Cypress Semiconductor continuously extends its portfolio of the code examples at the Cypress Semiconductor website and at the Cypress Semiconductor GitHub.
+
The CSDIDAC middleware can be used in various Development Environments such as ModusToolbox, MBED, etc. Refer to the Supported Software and Tools. The quickest way to get started is using the Code Examples. The continually expanding portfolio of the code examples is available at the Cypress Semiconductor website and on GitHub.
This quick start guide assumes that the environment is configured to use the PSoC 6 Peripheral Driver Library(psoc6pdl) for development and the PSoC 6 Peripheral Driver Library(psoc6pdl) is included in the project.
The steps required to set up the CSDIDAC and get the desired current:
@@ -139,7 +139,7 @@
Include cy_csdidac.h to get access to all CSDIDAC API and cy_pdl.h to get access to API of peripheral drivers according to the example below:
#include "cy_pdl.h"
#include "cy_csdidac.h"
If you use the MBED OS, include the cycfg.h file to get access to the System Configuration:
#include "cycfg.h"
Declare the 'cy_csdidac_context' variable as per example below:
Sigma Delta)" section of the PSoC 6 Peripheral Driver Library (psoc6pdl) API Reference Manual. This section guides how to set up the CSDIDAC middleware for the operation with the following parameters:
Device VDDA: 3.3V.
Device Peri Clock frequency: 48MHz.
-
IDAC A is sourcing current of 50 uA to GPIO pin P6[2].
-
IDAC B is sinking current of 0.5uA from GPIO pin P6[3].
+
IDAC A is sourcing current of 50 uA to GPIO pin P0[4].
+
IDAC B is sinking current of 0.5uA from GPIO pin P0[5].
There are two methods for the CSDIDAC Middleware configuration:
The steps required to implement the initialization code manually:
Launch the ModusToolbox Middleware Selector and enable the CSD IDAC middleware. This step is required only if the ModusToolbox IDE is used. Otherwise, ensure the CSDIDAC Middleware is included in your project.
Define the CSD HW block base address. See the code example below:
#define CSDIDAC_HW (CSD0)
-
Declare the CSD HW driver context structure and initialize the lockKey field with the CY_CSD_NONE_KEY value. See the code example below:
cy_stc_csd_context_t csdDriverContext =
{
.lockKey = CY_CSD_NONE_KEY, /* Initialization of the lockKey with the CY_CSD_NONE_KEY
is required */
};
-
Declare the CSDIDAC configuration structure and initialize it according to the desired parameters. See the code example below:
.base = CSDIDAC_HW, /* The CSD0 HW block is selected for CSDIDAC operation. */
.csdCxtPtr = &csdDriverContext, /* Points to the CSD driver context structure. */
.configA = CY_CSDIDAC_GPIO, /* Routes the IDAC A output to the pin. */
.configB = CY_CSDIDAC_GPIO, /* Routes the IDAC B output to the pin. */
.ptrPinA = (constcy_stc_csdidac_pin_t *) &csdIdacAPin, /* Points to the structure with configured IDAC A Port/Pin. */
.ptrPinB = (constcy_stc_csdidac_pin_t *) &csdIdacBPin, /* Points to the structure with configured IDAC B Port/Pin. */
.cpuClk = 48000000u, /* Provides the absolute CPU clock frequency in the current design (configured to 48MHz). */
.csdInitTime = 25u, /* Configures the CSD0 wake-up initialization time to 25 us (as default). */
};
-
Assign the Peripheral Clock Divider to the CSD HW block and configure the divider value. See the code example below and refer to the main() routine code snippet in Quick Start Guide
/*
* The code below performs the following operations:
* 1. Disable the Peripheral Clock Divider with index #0 before it
* is assigned to the CSD HW block.
* 2. Assign the Peripheral Clock Divider with index #0 to the CSD HW block.
* 3. Configure the assigned divider with divider value 0 (to divide by 1).
* 4. Enable the assigned divider.
*
* PCLK_CSD_CLOCK - Connects the divider to the CSD HW block
* CY_SYSCLK_DIV_8_BIT - Uses the 8-bit divider. This divider is to
* limit the CSD clock frequency to 50 MHz. The Peri Clock frequency
* is 48 MHz (refer to the Configuration Considerations section), so the divider
* value is 0 (to divide by 1). No need for a wider divider type.
Set the configuration of the HSIOM_AMUX_SPLIT_CTL switches to route signal from CSD HW block to the pins configured as the CSDIDAC output channels. The AMUX_SPLIT_CTL[4] switches are closed to connect port P6 with the CSD HW block. Refer to the Technical Reference Manual (TRM) for more information regarding the analog interconnection. See the code example below and refer to the main() routine code snippet in Quick Start Guide
#if(1u == CY_IP_MXS40IOSS_VERSION)
HSIOM->AMUX_SPLIT_CTL[4] = HSIOM_AMUX_SPLIT_CTL_SWITCH_AA_SL_Msk | /* Closes the left AMUX-A switch of AMUX splitter #4. */
HSIOM_AMUX_SPLIT_CTL_SWITCH_AA_SR_Msk | /* Closes the right AMUX-A switch of AMUX splitter #4. */
HSIOM_AMUX_SPLIT_CTL_SWITCH_BB_SL_Msk | /* Closes the left AMUX-B switch of AMUX splitter #4. */
HSIOM_AMUX_SPLIT_CTL_SWITCH_BB_SR_Msk; /* Closes the right AMUX-B switch of AMUX splitter #4. */
#elif(2u == CY_IP_MXS40IOSS_VERSION)
HSIOM->AMUX_SPLIT_CTL[4] = HSIOM_V2_AMUX_SPLIT_CTL_SWITCH_AA_SL_Msk | /* Closes the left AMUX-A switch of AMUX splitter #4. */
HSIOM_V2_AMUX_SPLIT_CTL_SWITCH_AA_SR_Msk | /* Closes the right AMUX-A switch of AMUX splitter #4. */
HSIOM_V2_AMUX_SPLIT_CTL_SWITCH_BB_SL_Msk | /* Closes the left AMUX-B switch of AMUX splitter #4. */
HSIOM_V2_AMUX_SPLIT_CTL_SWITCH_BB_SR_Msk; /* Closes the right AMUX-B switch of AMUX splitter #4. */
#else
#error Not supported device
#endif /* (1u == CY_IP_MXS40IOSS_VERSION) */
Note
Some CSDIDAC configurations are restricted. The CSD personality has a mechanism to prevent writing an invalid configuration. If CSDIDAC is manually created, avoid the following combinations:
+
Declare the CSD HW driver context structure and initialize the lockKey field with the CY_CSD_NONE_KEY value. See the code example below:
cy_stc_csd_context_t csdDriverContext =
{
.lockKey = CY_CSD_NONE_KEY, /* Initialization of the lockKey with the CY_CSD_NONE_KEY
is required */
};
+
Declare the CSDIDAC configuration structure and initialize it according to the desired parameters. See the code example below:
.base = CSDIDAC_HW, /* The CSD0 HW block is selected for CSDIDAC operation. */
.csdCxtPtr = &csdDriverContext, /* Points to the CSD driver context structure. */
.configA = CY_CSDIDAC_GPIO, /* Routes the IDAC A output to the pin. */
.configB = CY_CSDIDAC_GPIO, /* Routes the IDAC B output to the pin. */
.ptrPinA = (constcy_stc_csdidac_pin_t *) &csdIdacAPin, /* Points to the structure with configured IDAC A Port/Pin. */
.ptrPinB = (constcy_stc_csdidac_pin_t *) &csdIdacBPin, /* Points to the structure with configured IDAC B Port/Pin. */
.cpuClk = 48000000u, /* Provides the absolute CPU clock frequency in the current design (configured to 48MHz). */
#if defined(CY_IP_MXCSDV2)
.csdInitTime = 25u, /* Configures the CSD0 wake-up initialization time to 25 us (as default) for the PSoC 6 device. */
#else
.csdInitTime = 10u, /* Configures the CSD0 wake-up initialization time to 10 us (as default) for the PSoC 4 device. */
#endif /* CY_IP_MXCSDV2 */
};
+
Assign the Peripheral Clock Divider to the CSD HW block and configure the divider value. See the code example below and refer to the main() routine code snippet in Quick Start Guide
/*
* The code below performs the following operations:
* 1. Disable the Peripheral Clock Divider with index #0 before it
* is assigned to the CSD HW block.
* 2. Assign the Peripheral Clock Divider with index #0 to the CSD HW block.
* 3. Configure the assigned divider with divider value 0 (to divide by 1).
* 4. Enable the assigned divider.
*
* PCLK_CSD_CLOCK - Connects the divider to the CSD HW block
* CY_SYSCLK_DIV_8_BIT - Uses the 8-bit divider. This divider is to
* limit the CSD clock frequency to 50 MHz. The Peri Clock frequency
* is 48 MHz (refer to the Configuration Considerations section), so the divider
* value is 0 (to divide by 1). No need for a wider divider type.
Set the configuration of the HSIOM_AMUX_SPLIT_CTL switches to route signal from CSD HW block to the pins configured as the CSDIDAC output channels.
+
The AMUX bus has segments that are separated with the HSIOM_AMUX_SPLIT_CTL switches. The code below closes the AMUX_SPLIT_CTL switches, which route the IDAC output signal from the CSD block to the pin. In this example, IDAC output channels are assigned to the P0[4] and P[5] pins. The AMUX_SPLIT_CTL[5] and AMUX_SPLIT_CTL[6] switches must be closed in the PSoC6 device. The P0[4] and P[5] pins in the PSoC4 device belong to the AMUX bus segment, which is connected to the CSD block directly. In this case, the AMUX_SPLIT_CTL switches are not closed. Refer to the Technical Reference Manual (TRM) for more information regarding the analog interconnection. See the code example below and refer to the main() routine code snippet in Quick Start Guide
#if defined(CY_IP_MXCSDV2)
#if(1u == CY_IP_MXS40IOSS_VERSION)
HSIOM->AMUX_SPLIT_CTL[5] = HSIOM_AMUX_SPLIT_CTL_SWITCH_AA_SL_Msk | /* Closes the left AMUX-A switch of AMUX splitter #5. */
HSIOM_AMUX_SPLIT_CTL_SWITCH_AA_SR_Msk | /* Closes the right AMUX-A switch of AMUX splitter #5. */
HSIOM_AMUX_SPLIT_CTL_SWITCH_BB_SL_Msk | /* Closes the left AMUX-B switch of AMUX splitter #5. */
HSIOM_AMUX_SPLIT_CTL_SWITCH_BB_SR_Msk; /* Closes the right AMUX-B switch of AMUX splitter #5. */
HSIOM->AMUX_SPLIT_CTL[6] = HSIOM_AMUX_SPLIT_CTL_SWITCH_AA_SL_Msk | /* Closes the left AMUX-A switch of AMUX splitter #6. */
HSIOM_AMUX_SPLIT_CTL_SWITCH_AA_SR_Msk | /* Closes the right AMUX-A switch of AMUX splitter #6. */
HSIOM_AMUX_SPLIT_CTL_SWITCH_BB_SL_Msk | /* Closes the left AMUX-B switch of AMUX splitter #6. */
HSIOM_AMUX_SPLIT_CTL_SWITCH_BB_SR_Msk; /* Closes the right AMUX-B switch of AMUX splitter #6. */
#elif(2u == CY_IP_MXS40IOSS_VERSION)
HSIOM->AMUX_SPLIT_CTL[5] = HSIOM_V2_AMUX_SPLIT_CTL_SWITCH_AA_SL_Msk | /* Closes the left AMUX-A switch of AMUX splitter #5. */
HSIOM_V2_AMUX_SPLIT_CTL_SWITCH_AA_SR_Msk | /* Closes the right AMUX-A switch of AMUX splitter #5. */
HSIOM_V2_AMUX_SPLIT_CTL_SWITCH_BB_SL_Msk | /* Closes the left AMUX-B switch of AMUX splitter #5. */
HSIOM_V2_AMUX_SPLIT_CTL_SWITCH_BB_SR_Msk; /* Closes the right AMUX-B switch of AMUX splitter #5. */
HSIOM->AMUX_SPLIT_CTL[6] = HSIOM_V2_AMUX_SPLIT_CTL_SWITCH_AA_SL_Msk | /* Closes the left AMUX-A switch of AMUX splitter #6. */
HSIOM_V2_AMUX_SPLIT_CTL_SWITCH_AA_SR_Msk | /* Closes the right AMUX-A switch of AMUX splitter #6. */
HSIOM_V2_AMUX_SPLIT_CTL_SWITCH_BB_SL_Msk | /* Closes the left AMUX-B switch of AMUX splitter #6. */
HSIOM_V2_AMUX_SPLIT_CTL_SWITCH_BB_SR_Msk; /* Closes the right AMUX-B switch of AMUX splitter #6. */
#else
#error Not supported device
#endif /* (1u == CY_IP_MXS40IOSS_VERSION) */
#endif /* CY_IP_MXCSDV2 */
Note
If you use a KIT, check on the schematics, if pins P0[4] and P0[5] are free. If not, use some other pins and update the AMUX_SPLIT_CTL registers.
+
+Some CSDIDAC configurations are restricted. The CSD personality has a mechanism to prevent writing an invalid configuration. If CSDIDAC is manually created, avoid the following combinations:
both IDAC channels are disabled
one IDAC channel is disabled and another channel is joined to it
the IDAC A channel and IDAC B channel are joined to each other
-Refer to Quick Start Guide section for the application layer code required to set up the CSDIDAC and to get the desired current on the assigned pin.
+
Refer to Quick Start Guide section for the application layer code required to set up the CSDIDAC and to get the desired current on the assigned pin.
+
Use Cases
@@ -214,14 +218,14 @@
Low power design
The CSD HW block and CSDIDAC middleware can operate in CPU active and CPU sleep power modes. It is also possible to switch between low power and ultra low power system modes. In System Deep Sleep and Hibernate power modes, the CSD HW block is powered off and CSDIDAC operations are not performed. Before entering CPU / System Deep Sleep, disable CSDIDAC output current generation. If output currents are not disabled, a CPU Deep Sleep transition will fail. When the device wakes up from CPU / System Deep Sleep, the CSD HW block resumes operation without the need for re-initialization and the CSDIDAC operations can be continued with configuration that was set before a CPU / System Deep Sleep transition. When the device wakes up from Hibernate power mode, the CSD HW block does not retain the configuration and CSDIDAC requires re-initialization.
Note
-
Analog start up time for the CSD HW block is 25 us. Initiate any kind of operation only after 25 us from System Deep Sleep / Hibernate exit.
+
Analog start up time for the CSD HW block is 25 us for PSoC6 devices and 10 us for PSoC4 devices. Initiate any kind of operation only after 25 us for PSoC6 devices and 10 us for PSoC4 devices from System Deep Sleep / Hibernate exit.
Entering CPU Deep Sleep mode does not mean the device enters System Deep Sleep. For more detail about switching to System Deep Sleep, refer to the device TRM.
Refer to the Cy_CSDIDAC_DeepSleepCallback() function description and to the SysPm (System Power Management) driver documentation for the low power design considerations.
Sleep mode
- The CSD HW block can operate in CPU sleep mode. The user can start CSDIDAC and move CPU into sleep mode to reduce power consumption. After wake-up CPU from sleep, the user can perform other operations, e.g. disable IDACs. Then, the user configures the CSDIDAC middleware as described in Configuration Considerations, and updates the main() routine with the following code:
/* Scenario: There is a need to generate two output currents while CPU is in Sleep mode. */
/* ... */
for (;;)
{
/* Starts CSDIDAC generation of two output currents. */
* Insert here code to perform after Sleep mode operations, e.g. to disable IDACs.
*/
}
Deep Sleep mode
- To use the CSDIDAC middleware in CPU / System Deep Sleep mode, the user configures a wake-up source (e.g. a pin, WDT, LPC or another entities, that are active in CPU / System Deep Sleep mode), configures the CSDIDAC middleware as described in Configuration Considerations, configures CSDIDAC and other drivers' and middleware's (if presented) Deep Sleep Callback structures, registers callbacks, and updates the main() routine with the following code:
* After Deep Sleep, CPU and CSD HW block wake-up, CSDIDAC can generate
* two output currents, as it was configured before transitions.
*/
/* ... */
}
+ The CSD HW block can operate in CPU sleep mode. The user can start CSDIDAC and move CPU into sleep mode to reduce power consumption. After wake-up CPU from sleep, the user can perform other operations, e.g. disable IDACs. Then, the user configures the CSDIDAC middleware as described in Configuration Considerations, and updates the main() routine with the following code:
/* Scenario: There is a need to generate two output currents while CPU is in Sleep mode. */
/* ... */
for (;;)
{
/* Starts CSDIDAC generation of two output currents. */
* Insert here code to perform after Sleep mode operations, e.g. to disable IDACs.
*/
}
Deep Sleep mode
+ To use the CSDIDAC middleware in CPU / System Deep Sleep mode, the user configures a wake-up source (e.g. a pin, WDT, LPC or another entities, that are active in CPU / System Deep Sleep mode), configures the CSDIDAC middleware as described in Configuration Considerations, configures CSDIDAC and other drivers' and middleware's (if present) Deep Sleep Callback structures, registers callbacks, and updates the main() routine with the following code:
- ModusToolbox CSD Personality for PSoC4 devices in Device Configurator
1.0
-
- ModusToolbox Device Configurator
2.0
+
- ModusToolbox CSD Personality for PSoC6 devices in Device Configurator
2.0
-
- ModusToolbox CSD Personality in Device Configurator
2.0
+
PSoC4 Peripheral Driver Library (PDL)
1.0.0
-
PSoC6 Peripheral Driver Library (PDL)
1.2.0
+
PSoC6 Peripheral Driver Library (PDL)
1.5.0
GCC Compiler
7.2.1
@@ -245,7 +253,7 @@
Arm Compiler 6
6.11
-
MBED OS
5.13.1
+
MBED OS (only for PSoC6)
5.15.1
FreeRTOS
10.0.1
@@ -276,6 +284,10 @@
Version
Changes
Reason for Change
+
2.10
Added the support of PSoC 4 CapSense Forth Generation devices
Devices support
+
+
Minor documentation update
Documentation cleanup
+
2.0
The joining two IDAC channels option is added to increase the maximum CSDIDAC output current
Feature enchancement
The cy_stc_csdidac_config_t structure is changed: the periClk field replaced with cpuClk, busOnlyA and busOnlyB fields replaced with configA and configB fields respectively, the field order is changed. The cy_en_csdidac_channel_config_t enumeration type is added.
User experience improvement
@@ -290,27 +302,49 @@
More Information
+
Important information about the CapSense-technology overview, appropriate device for the design, CapSense system and sensor design guidelines, different interfaces and tuning guidelines necessary for a successful design of a CapSense system is available in the Getting Started with CapSense document and the product-specific CapSense design guide. It is highly recommended to start with these documents. They can be found at www.cypress.com.
For more information, refer to the following documents:
The links to another software component’s documentation (middleware and PDL) point to GitHub to the latest available version of the software. To get documentation of the specified version, download from GitHub and unzip the component archive. The documentation is available in the docs folder.
+
+
+
Note
The links to another software component's documentation (middleware and PDL) point to GitHub to the latest available version of the software. To get documentation of the specified version, download from GitHub and unzip the component archive. The documentation is available in the docs folder.