MTB CAT1 Peripheral driver library
Low Power features control Functions

General Description

Functions

cy_en_sar_status_t Cy_SAR_ScanCountEnable (const SAR_Type *base)
 Enables the Scanning Counter. More...
 
__STATIC_INLINE void Cy_SAR_ScanCountDisable (const SAR_Type *base)
 Disables the Scanning Counter. More...
 
__STATIC_INLINE void Cy_SAR_SelectClock (const SAR_Type *base, cy_en_sar_clock_source_t clock)
 Switch the SAR input clock source. More...
 

Function Documentation

◆ Cy_SAR_ScanCountEnable()

cy_en_sar_status_t Cy_SAR_ScanCountEnable ( const SAR_Type base)

Enables the Scanning Counter.

Suitable for PASS_V2.

Parameters
basePointer to the structure of SAR instance registers.
Returns
The status:
  • CY_SAR_BAD_PARAM - either the feature is not supported by this IP version or the injection channel is triggered and not tailgating.
  • CY_SAR_SUCCESS - the SAR Scanning Counter feature is successfully enabled.
Function Usage
/* Scenario: SAR is going to be used in Deep Sleep Mode */
/* Scenario: And also SAR will take several samples at one Timer trigger.
* Presuming the Scan Counter is configured here using Cy_SAR_CommonInit().
*/
{
/* insert error handling */
}
/* Scenario: All these low power features are not needed more */

◆ Cy_SAR_ScanCountDisable()

__STATIC_INLINE void Cy_SAR_ScanCountDisable ( const SAR_Type base)

Disables the Scanning Counter.

Parameters
basePointer to the structure of SAR instance registers.
Function Usage
/* Scenario: SAR is going to be used in Deep Sleep Mode */
/* Scenario: And also SAR will take several samples at one Timer trigger.
* Presuming the Scan Counter is configured here using Cy_SAR_CommonInit().
*/
{
/* insert error handling */
}
/* Scenario: All these low power features are not needed more */

◆ Cy_SAR_SelectClock()

__STATIC_INLINE void Cy_SAR_SelectClock ( const SAR_Type base,
cy_en_sar_clock_source_t  clock 
)

Switch the SAR input clock source.

Suitable for PASS_V2 only. In case of CY_SAR_CLK_DEEPSLEEP it enables SAR operation in Deep Sleep mode.

Parameters
basePointer to the structure of SAR instance registers.
clockThe SAR clock source cy_en_sar_clock_source_t.
Function Usage
/* Scenario: SAR is going to be used in Deep Sleep Mode */
/* Scenario: And also SAR will take several samples at one Timer trigger.
* Presuming the Scan Counter is configured here using Cy_SAR_CommonInit().
*/
{
/* insert error handling */
}
/* Scenario: All these low power features are not needed more */