CAT2 Peripheral Driver Library

Functions

cy_en_msclp_status_t Cy_MSCLP_Init (MSCLP_Type *base, cy_stc_msclp_base_config_t const *config, cy_en_msclp_key_t key, cy_stc_msclp_context_t *context)
 Acquires, locks, and configures the MSCLP HW block. More...
 
cy_en_msclp_status_t Cy_MSCLP_DeInit (MSCLP_Type *base, cy_en_msclp_key_t key, cy_stc_msclp_context_t *context)
 Releases the MSCLP HW block previously captured and locked by the caller. More...
 
cy_en_msclp_status_t Cy_MSCLP_Capture (MSCLP_Type *base, cy_en_msclp_key_t key, cy_stc_msclp_context_t *context)
 Acquires and locks the MSCLP HW block without changing its configuration. More...
 
cy_en_msclp_status_t Cy_MSCLP_Configure (MSCLP_Type *base, const cy_stc_msclp_base_config_t *config, cy_en_msclp_key_t key, const cy_stc_msclp_context_t *context)
 Sets configuration of all MSCLP HW block registers at once. More...
 
cy_en_msclp_status_t Cy_MSCLP_MrssStart (MSCLP_Type *base, cy_stc_msclp_mrss_config_t const *mrssCfg, cy_en_msclp_key_t key, cy_stc_msclp_context_t const *context)
 Turns on the MRSS resources. More...
 
cy_en_msclp_status_t Cy_MSCLP_MrssStop (MSCLP_Type *base, cy_en_msclp_key_t key, cy_stc_msclp_context_t const *context)
 Turns off the MRSS resources. More...
 
cy_en_msclp_status_t Cy_MSCLP_MrssStatus (MSCLP_Type *base, cy_en_msclp_key_t key, cy_stc_msclp_context_t const *context)
 Returns the MRSS status (enabled/disabled). More...
 
void Cy_MSCLP_ConfigureScan (MSCLP_Type *base, uint32_t numRegs, const uint32_t *scanConfig)
 Sets configuration of sensor frame registers of the MSCLP HW block and starts the scan. More...
 
__STATIC_INLINE cy_en_msclp_key_t Cy_MSCLP_GetLockStatus (const MSCLP_Type *base, const cy_stc_msclp_context_t *context)
 Verifies whether the specified MSCLP HW block is acquired and locked by a higher-level firmware. More...
 
__STATIC_INLINE cy_en_msclp_status_t Cy_MSCLP_GetConversionStatus (const MSCLP_Type *base, const cy_stc_msclp_context_t *context)
 Verifies whether the specified MSCLP HW block is busy (performing scan or conversion). More...
 
__STATIC_INLINE uint32_t Cy_MSCLP_ReadReg (const MSCLP_Type *base, uint32_t offset)
 Reads value from the specified the MSCLP HW block register. More...
 
__STATIC_INLINE void Cy_MSCLP_WriteReg (MSCLP_Type *base, uint32_t offset, uint32_t value)
 Writes a value to the specified MSCLP HW block register. More...
 
__STATIC_INLINE void Cy_MSCLP_SetBits (MSCLP_Type *base, uint32_t offset, uint32_t mask)
 Sets bits, specified by the Mask parameter in the MSCLP HW block register, specified by the Offset parameter. More...
 
__STATIC_INLINE void Cy_MSCLP_ClrBits (MSCLP_Type *base, uint32_t offset, uint32_t mask)
 Clears bits, specified by the Mask parameter in the MSCLP HW block register, specified by the Offset parameter. More...
 
__STATIC_INLINE void Cy_MSCLP_WriteBits (MSCLP_Type *base, uint32_t offset, uint32_t mask, uint32_t value)
 Writes field, specified by the Mask parameter with the value, specified by the Value parameter. More...
 
__STATIC_INLINE void Cy_MSCLP_SwStartFrame (MSCLP_Type *base)
 The function initiates the non-blocking scan of an entire configured frame by launch the MSCLP HW block state machine. More...
 
__STATIC_INLINE void Cy_MSCLP_SwStartAosFrame (MSCLP_Type *base)
 The function initiates the non-blocking scan of an entire configured frame by launch the MSCLP HW block state machine. More...
 
__STATIC_INLINE uint32_t Cy_MSCLP_ReadSensorDataWord (MSCLP_Type const *base, uint32_t addr)
 Reads one 32-bit data word from the SNS.SENSOR_DATA memory. More...
 
void Cy_MSCLP_ReadSensorDataArray (MSCLP_Type const *base, uint32_t startAddr, uint32_t *ptrData, uint32_t dataSize)
 Reads an array of 32-bit data words from the SNS.SENSOR_DATA memory. More...
 
__STATIC_INLINE void Cy_MSCLP_WriteSensorDataWord (MSCLP_Type *base, uint32_t addr, uint32_t data)
 Writes one 32-bit data word into the SNS.SENSOR_DATA memory. More...
 
cy_en_msclp_status_t Cy_MSCLP_WriteSensorDataArray (MSCLP_Type *base, uint32_t startAddr, uint32_t const *ptrData, uint32_t dataSize)
 Writes an array of 32-bit data words into the SNS.SENSOR_DATA memory. More...
 

Detailed Description

Function Documentation

◆ Cy_MSCLP_Init()

cy_en_msclp_status_t Cy_MSCLP_Init ( MSCLP_Type *  base,
cy_stc_msclp_base_config_t const *  config,
cy_en_msclp_key_t  key,
cy_stc_msclp_context_t context 
)

Acquires, locks, and configures the MSCLP HW block.

If the MSCLP HW block is already in use by other middleware or by the application program, the function returns the CY_MSCLP_LOCKED status and does not configure the MSCLP HW block.

If the acquisition is successful, this function writes configuration data into all MSCLP HW block registers (except read-only registers and SEQ_START register) at once. Because the SEQ_START register is excluded from write, use the Cy_MSCLP_WriteReg() function to trigger the state machine for scan or conversion.

To capture the MSCLP block without its reconfiguration use the Cy_MSCLP_Capture() function.

Parameters
baseThe pointer to a MSCLP HW block base address.
configThe pointer to a configuration structure that contains the initial configuration.
keyThe ID of middleware or a user-level function to work with the specified MSCLP HW block.
contextThe pointer to the context structure allocated by the user or middleware.
Returns
Returns the operation result status (MSCLP status code). See cy_en_msclp_status_t.
Function Usage
/*
* Scenario: Capture MSCLP HW block to perform a conversion.
* This scenario does not cover Pins, Clock, Interrupt, configuration.
*/
/*...*/
/* Allocates MSCLP configuration structure and initialize it with user's configuration */
const cy_stc_msclp_base_config_t customConfig = CUSTOM_CONFIG;
/* Checks if the MSCLP block if free */
key = Cy_MSCLP_GetLockStatus(MSCLP0, &msclpContext);
if (CY_MSCLP_NONE_KEY == key)
{
/* Captures the MSCLP block and initialize it with user's configuration */
status = Cy_MSCLP_Init(MSCLP0, &customConfig, CY_MSCLP_USER_DEFINED_KEY, &msclpContext);
/* Checks if the MSCLP block was captured successfully */
if (CY_MSCLP_SUCCESS == status)
{
/* Block is captured successfully. User's application code can be placed and executed here. */
}
}
/*...*/

◆ Cy_MSCLP_DeInit()

cy_en_msclp_status_t Cy_MSCLP_DeInit ( MSCLP_Type *  base,
cy_en_msclp_key_t  key,
cy_stc_msclp_context_t context 
)

Releases the MSCLP HW block previously captured and locked by the caller.

If the MSCLP HW block is acquired by another caller or the block is in the busy state (performing scan or conversion), the de-initialization request is ignored and the corresponding status is returned.

Parameters
baseThe pointer to a MSCLP HW block base address.
keyThe ID of middleware or a user-level function to work with the specified MSCLP HW block.
contextThe pointer to the context structure allocated by the user or middleware.
Returns
Returns the operation result status (MSCLP status code). See cy_en_msclp_status_t.

◆ Cy_MSCLP_Capture()

cy_en_msclp_status_t Cy_MSCLP_Capture ( MSCLP_Type *  base,
cy_en_msclp_key_t  key,
cy_stc_msclp_context_t context 
)

Acquires and locks the MSCLP HW block without changing its configuration.

If the MSCLP HW block is already in use by other middleware or by the application program, then the function returns the CY_MSCLP_LOCKED status.

Note
This is a low-level function. Use the Cy_MSCLP_Init() function instead. The Cy_MSCLP_Capture() function is used by upper-level middleware to improve efficiency. It also can be used to implement specific use cases. If this function is used, configure the MSCLP block using the Cy_MSCLP_Configure() function.
Parameters
baseThe pointer to a MSCLP HW block base address.
keyThe ID of middleware or a user-level function to work with the specified MSCLP HW block.
contextThe pointer to the context structure allocated by the user or middleware.
Returns
Returns the operation result status (MSCLP status code). See cy_en_msclp_status_t.
Function Usage
/*
* Scenario: Capture the already configured MSCLP HW block.
* This scenario does not cover Pins, Clock, Interrupt, configuration.
*/
/* Checks if the MSCLP block if free */
if (CY_MSCLP_NONE_KEY == Cy_MSCLP_GetLockStatus(MSCLP0, &msclpContext))
{
/* Captures the MSCLP block */
{
/* Block is captured successfully. The user's application code can be placed and executed here. */
}
else
{
/* The block capture has failed. Probably, it was already captured by another process. */
}
}

◆ Cy_MSCLP_Configure()

cy_en_msclp_status_t Cy_MSCLP_Configure ( MSCLP_Type *  base,
const cy_stc_msclp_base_config_t config,
cy_en_msclp_key_t  key,
const cy_stc_msclp_context_t context 
)

Sets configuration of all MSCLP HW block registers at once.

This function writes configuration data into all MSCLP block registers (except read-only registers and the SEQ_START register) at once. Because the SEQ_START register is excluded from write, use the Cy_MSCLP_WriteReg() function to perform triggering state machine for scan or conversion.

Parameters
baseThe pointer to a MSCLP HW block base address.
configThe pointer to a configuration structure that contains initial configuration.
keyThe ID of middleware or a user-level function to work with the specified MSCLP HW block.
contextThe pointer to the context structure allocated by the user or middleware.
Returns
Returns the operation result status (MSCLP status code). See cy_en_msclp_status_t.

◆ Cy_MSCLP_MrssStart()

cy_en_msclp_status_t Cy_MSCLP_MrssStart ( MSCLP_Type *  base,
cy_stc_msclp_mrss_config_t const *  mrssCfg,
cy_en_msclp_key_t  key,
cy_stc_msclp_context_t const *  context 
)

Turns on the MRSS resources.

Checks the system defined VDDA value and turns on PUMP if VDDA is less then the threshold defined by the CY_MSCLP_VDDA_PUMP_TRESHOLD macro, else turns on only REF and IMO.

Parameters
baseThe pointer to a MSCLP HW block base address.
mrssCfgThe pointer to the MRSS configuration structure cy_stc_msclp_mrss_config_t.
keyThe ID of middleware or a user-level function to work with the specified MSCLP HW block cy_en_msclp_key_t.
contextThe pointer to the context structure allocated by the user or middleware.
Returns
Returns the status of the operation:
  • CY_MSCLP_SUCCESS - The MRSS have been started successfully
  • CY_MSCLP_BAD_PARAM - One or more invalid input parameters
  • CY_MSCLP_LOCKED - The MSCLP HW block is captured by another middleware
  • CY_MSCLP_TIMEOUT - It is a timeout reached while the MRSS start. The timeout value is defined as a multiplication of the CY_MSCLP_CLK_LF_PERIOD_MAX and CY_MSCLP_MRSS_TIMEOUT_FULL or CY_MSCLP_MRSS_TIMEOUT macros

◆ Cy_MSCLP_MrssStop()

cy_en_msclp_status_t Cy_MSCLP_MrssStop ( MSCLP_Type *  base,
cy_en_msclp_key_t  key,
cy_stc_msclp_context_t const *  context 
)

Turns off the MRSS resources.

Parameters
baseThe pointer to a MSCLP HW block base address.
keyThe ID of middleware or a user-level function to work with the specified MSCLP HW block.
contextThe pointer to the context structure allocated by the user or middleware.
Returns
Returns the status of the operation:
  • CY_MSCLP_SUCCESS - The MRSS have been stopped successfully.
  • CY_MSCLP_BAD_PARAM - One or more invalid input parameters
  • CY_MSCLP_LOCKED - The MSCLP HW block is captured by another middleware
  • CY_MSCLP_TIMEOUT - The timeout is reached while the MRSS stop. The timeout value is defined by the CY_MSCLP_CLK_LF_PERIOD_MAX macro

◆ Cy_MSCLP_MrssStatus()

cy_en_msclp_status_t Cy_MSCLP_MrssStatus ( MSCLP_Type *  base,
cy_en_msclp_key_t  key,
cy_stc_msclp_context_t const *  context 
)

Returns the MRSS status (enabled/disabled).

Parameters
baseThe pointer to a MSCLP HW block base address.
keyThe ID of middleware or a user-level function to work with the specified MSCLP HW block.
contextThe pointer to the context structure allocated by the user or middleware.
Returns
Returns the status of the operation:
  • CY_MSCLP_SUCCESS - The MRSS is enabled
  • CY_MSCLP_MRSS_DISABLED - The MRSS is disabled
  • CY_MSCLP_BAD_PARAM - One or more invalid input parameters
  • CY_MSCLP_LOCKED - The MSCLP HW block is captured by another middleware

◆ Cy_MSCLP_ConfigureScan()

void Cy_MSCLP_ConfigureScan ( MSCLP_Type *  base,
uint32_t  numRegs,
const uint32_t *  scanConfig 
)

Sets configuration of sensor frame registers of the MSCLP HW block and starts the scan.

Note
Accessing the SNS group registers under disabled MRSS might lead to the device hard fault. Therefore, access the SNS group registers of the MSCLP HW block only under enabled MRSS. To enable, disable or check the MRSS power status, use the Cy_MSCLP_MrssStart(), Cy_MSCLP_MrssStop() or Cy_MSCLP_MrssStatus() functions respectively.
Parameters
basePointer to a MSCLP HW block base address.
numRegsNumber of registers in scan configuration written into MSCLP HW block. Possible values are CY_MSCLP_6_SNS_REGS and CY_MSCLP_11_SNS_REGS. CY_MSCLP_5_SNS_REGS is also supported.
scanConfigThe pointer to a scan configuration structure.

◆ Cy_MSCLP_GetLockStatus()

__STATIC_INLINE cy_en_msclp_key_t Cy_MSCLP_GetLockStatus ( const MSCLP_Type *  base,
const cy_stc_msclp_context_t context 
)

Verifies whether the specified MSCLP HW block is acquired and locked by a higher-level firmware.

Parameters
basePointer to a MSCLP HW block base address.
contextThe pointer to the context structure allocated by a user or middleware.
Returns
Returns a key code. See cy_en_msclp_key_t.
Function Usage
key = Cy_MSCLP_GetLockStatus(MSCLP0, &msclpContext);
if (CY_MSCLP_NONE_KEY == key)
{
/* The MSCLP block is not captured */
}

◆ Cy_MSCLP_GetConversionStatus()

__STATIC_INLINE cy_en_msclp_status_t Cy_MSCLP_GetConversionStatus ( const MSCLP_Type *  base,
const cy_stc_msclp_context_t context 
)

Verifies whether the specified MSCLP HW block is busy (performing scan or conversion).

Note
Accessing the SNS group registers under disabled MRSS might lead to the device hard fault. Therefore, access the SNS group registers of the MSCLP HW block only under enabled MRSS. To enable, disable or check the MRSS power status, use the Cy_MSCLP_MrssStart(), Cy_MSCLP_MrssStop() or Cy_MSCLP_MrssStatus() functions respectively.
Parameters
basePointer to a MSCLP HW block base address.
contextThe pointer to the context structure allocated by a user or middleware.
Returns
Returns status code. See cy_en_msclp_status_t.
Function Usage
status = Cy_MSCLP_GetConversionStatus(MSCLP0, &msclpContext);
if (CY_MSCLP_BUSY == status)
{
/* The MSCLP block is performing a conversion */
}
else
{
/* The MSCLP block is not busy and a new conversion can be started */
}

◆ Cy_MSCLP_ReadReg()

__STATIC_INLINE uint32_t Cy_MSCLP_ReadReg ( const MSCLP_Type *  base,
uint32_t  offset 
)

Reads value from the specified the MSCLP HW block register.

Note
Accessing the SNS group registers under disabled MRSS might lead to the device hard fault. Therefore, access the SNS group registers of the MSCLP HW block only under enabled MRSS. To enable, disable or check the MRSS power status, use the Cy_MSCLP_MrssStart(), Cy_MSCLP_MrssStop() or Cy_MSCLP_MrssStatus() functions respectively.
Parameters
basePointer to a MSCLP HW block base address.
offsetRegister offset relative to base address.
Returns
Returns a value of the MSCLP HW block register, specified by the offset parameter.
Function Usage
void snippet_Cy_MSCLP_IntHandler(void)
{
uint32_t intrStatus;
/* Reads interrupt status register */
/* Checks the 'single scan is complete' event that triggered the interrupt */
if ((intrStatus & MSCLP_INTR_SCAN_Msk) == MSCLP_INTR_SCAN_Msk)
{
/* End of scan occurred, get the result and do something with it here */
}
/* Clears the pending interrupts */
}

◆ Cy_MSCLP_WriteReg()

__STATIC_INLINE void Cy_MSCLP_WriteReg ( MSCLP_Type *  base,
uint32_t  offset,
uint32_t  value 
)

Writes a value to the specified MSCLP HW block register.

Note
Accessing the SNS group registers under disabled MRSS might lead to the device hard fault. Therefore, access the SNS group registers of the MSCLP HW block only under enabled MRSS. To enable, disable or check the MRSS power status, use the Cy_MSCLP_MrssStart(), Cy_MSCLP_MrssStop() or Cy_MSCLP_MrssStatus() functions respectively.
Parameters
basePointer to a MSCLP HW block base address.
offsetRegister offset relative to base address.
valueValue to be written to the register.
Function Usage
void snippet_Cy_MSCLP_IntHandler(void)
{
uint32_t intrStatus;
/* Reads interrupt status register */
/* Checks the 'single scan is complete' event that triggered the interrupt */
if ((intrStatus & MSCLP_INTR_SCAN_Msk) == MSCLP_INTR_SCAN_Msk)
{
/* End of scan occurred, get the result and do something with it here */
}
/* Clears the pending interrupts */
}

◆ Cy_MSCLP_SetBits()

__STATIC_INLINE void Cy_MSCLP_SetBits ( MSCLP_Type *  base,
uint32_t  offset,
uint32_t  mask 
)

Sets bits, specified by the Mask parameter in the MSCLP HW block register, specified by the Offset parameter.

Note
Accessing the SNS group registers under disabled MRSS might lead to the device hard fault. Therefore, access the SNS group registers of the MSCLP HW block only under enabled MRSS. To enable, disable or check the MRSS power status, use the Cy_MSCLP_MrssStart(), Cy_MSCLP_MrssStop() or Cy_MSCLP_MrssStatus() functions respectively.
Parameters
basePointer to a MSCLP HW block base address.
offsetRegister offset relative to base address.
maskMask value for register bits to be set.

◆ Cy_MSCLP_ClrBits()

__STATIC_INLINE void Cy_MSCLP_ClrBits ( MSCLP_Type *  base,
uint32_t  offset,
uint32_t  mask 
)

Clears bits, specified by the Mask parameter in the MSCLP HW block register, specified by the Offset parameter.

Note
Accessing the SNS group registers under disabled MRSS might lead to the device hard fault. Therefore, access the SNS group registers of the MSCLP HW block only under enabled MRSS. To enable, disable or check the MRSS power status, use the Cy_MSCLP_MrssStart(), Cy_MSCLP_MrssStop() or Cy_MSCLP_MrssStatus() functions respectively.
Parameters
basePointer to a MSCLP HW block base address.
offsetRegister offset relative to base address.
maskMask value for register bits to be cleared.

◆ Cy_MSCLP_WriteBits()

__STATIC_INLINE void Cy_MSCLP_WriteBits ( MSCLP_Type *  base,
uint32_t  offset,
uint32_t  mask,
uint32_t  value 
)

Writes field, specified by the Mask parameter with the value, specified by the Value parameter.

Note
Accessing the SNS group registers under disabled MRSS might lead to the device hard fault. Therefore, access the SNS group registers of the MSCLP HW block only under enabled MRSS. To enable, disable or check the MRSS power status, use the Cy_MSCLP_MrssStart(), Cy_MSCLP_MrssStop() or Cy_MSCLP_MrssStatus() functions respectively.
Parameters
basePointer to a MSCLP HW block base address.
offsetRegister offset relative to base address.
maskSpecifies bits to be modified.
valueSpecifies a value to be written to the register.

◆ Cy_MSCLP_SwStartFrame()

__STATIC_INLINE void Cy_MSCLP_SwStartFrame ( MSCLP_Type *  base)

The function initiates the non-blocking scan of an entire configured frame by launch the MSCLP HW block state machine.

The function requires the following things to be done ahead the function call:

  • the MRSS is enabled
  • MSCLP is configured to AS-MS mode and clearly defines a frame location inside MSCLP Sensor Data RAM
  • Sensor Data RAM is updated with the sensors frame configuration.

The MSCLP HW block takes the first sensor configuration from Sensor Data RAM and executes the scan. After scan is complete, the next sensor configuration is taken (without MCU involvement) and the scan is executes. It happens till the scan of the last sensor of a frame is complete. Then MSCLP state machine goes to the idle state.

Note
Accessing the SNS group registers under disabled MRSS might lead to the device hard fault. Therefore, access the SNS group registers of the MSCLP HW block only under enabled MRSS. To enable, disable or check the MRSS power status, use the Cy_MSCLP_MrssStart(), Cy_MSCLP_MrssStop() or Cy_MSCLP_MrssStatus() functions respectively.
Parameters
baseThe pointer to the MSCLP HW block base address.

◆ Cy_MSCLP_SwStartAosFrame()

__STATIC_INLINE void Cy_MSCLP_SwStartAosFrame ( MSCLP_Type *  base)

The function initiates the non-blocking scan of an entire configured frame by launch the MSCLP HW block state machine.

The function requires the following things to be done ahead the function call:

  • MSCLP is configured to LP-AOS mode and clearly defines a frame location inside MSCLP Sensor Data RAM
  • Sensor Data RAM is updated with the sensors frame configuration.

The MSCLP HW block launches internal timer. After timeout the block takes the first sensor configuration from Sensor Data RAM and executes the scan. After scan is complete, the next sensor configuration is taken (without MCU involvement) and the scan is executes. It happens till the scan of the last sensor in a frame is complete. Then the MSCLP state machine goes to the idle state if number of frame scans is configured to one. Otherwise frame is scanned the configured number of times with configured timeout.

Note
Accessing the SNS group registers under disabled MRSS might lead to the device hard fault. Therefore, access the SNS group registers of the MSCLP HW block only under enabled MRSS. To enable, disable or check the MRSS power status, use the Cy_MSCLP_MrssStart(), Cy_MSCLP_MrssStop() or Cy_MSCLP_MrssStatus() functions respectively.
Parameters
baseThe pointer to the MSCLP HW block base address.

◆ Cy_MSCLP_ReadSensorDataWord()

__STATIC_INLINE uint32_t Cy_MSCLP_ReadSensorDataWord ( MSCLP_Type const *  base,
uint32_t  addr 
)

Reads one 32-bit data word from the SNS.SENSOR_DATA memory.

Note
Accessing the SNS group registers under disabled MRSS might lead to the device hard fault. Therefore, access the SNS group registers of the MSCLP HW block only under enabled MRSS. To enable, disable or check the MRSS power status, use the Cy_MSCLP_MrssStart(), Cy_MSCLP_MrssStop() or Cy_MSCLP_MrssStatus() functions respectively.
Parameters
basePointer to a MSCLP HW block base address.
addrThe address (index of the 32-bit word) in the SNS.SENSOR_DATA.
Returns
The 32-bit data word value.

◆ Cy_MSCLP_ReadSensorDataArray()

void Cy_MSCLP_ReadSensorDataArray ( MSCLP_Type const *  base,
uint32_t  startAddr,
uint32_t *  ptrData,
uint32_t  dataSize 
)

Reads an array of 32-bit data words from the SNS.SENSOR_DATA memory.

Note
Accessing the SNS group registers under disabled MRSS might lead to the device hard fault. Therefore, access the SNS group registers of the MSCLP HW block only under enabled MRSS. To enable, disable or check the MRSS power status, use the Cy_MSCLP_MrssStart(), Cy_MSCLP_MrssStop() or Cy_MSCLP_MrssStatus() functions respectively.
Parameters
basePointer to a MSCLP HW block base address.
startAddrThe starting address (index of the 32-bit word) in the SNS.SENSOR_DATA.
ptrDataPointer to the 32-bit data array to be copied from the SNS.SENSOR_DATA.
dataSizeThe size of the data array (in 32-bit words).
Note
In case of the startAddr + dataSize exceeds the SNS.SENSOR_DATA size then no one data word will be copied.

◆ Cy_MSCLP_WriteSensorDataWord()

__STATIC_INLINE void Cy_MSCLP_WriteSensorDataWord ( MSCLP_Type *  base,
uint32_t  addr,
uint32_t  data 
)

Writes one 32-bit data word into the SNS.SENSOR_DATA memory.

Note
Accessing the SNS group registers under disabled MRSS might lead to the device hard fault. Therefore, access the SNS group registers of the MSCLP HW block only under enabled MRSS. To enable, disable or check the MRSS power status, use the Cy_MSCLP_MrssStart(), Cy_MSCLP_MrssStop() or Cy_MSCLP_MrssStatus() functions respectively.
Parameters
basePointer to a MSCLP HW block base address.
addrThe address (index of the 32-bit word) in the SNS.SENSOR_DATA.
dataThe 32-bit data word value.

◆ Cy_MSCLP_WriteSensorDataArray()

cy_en_msclp_status_t Cy_MSCLP_WriteSensorDataArray ( MSCLP_Type *  base,
uint32_t  startAddr,
uint32_t const *  ptrData,
uint32_t  dataSize 
)

Writes an array of 32-bit data words into the SNS.SENSOR_DATA memory.

Note
Accessing the SNS group registers under disabled MRSS might lead to the device hard fault. Therefore, access the SNS group registers of the MSCLP HW block only under enabled MRSS. To enable, disable or check the MRSS power status, use the Cy_MSCLP_MrssStart(), Cy_MSCLP_MrssStop() or Cy_MSCLP_MrssStatus() functions respectively.
Parameters
basePointer to a MSCLP HW block base address.
startAddrThe starting address (index of the 32-bit word) in the SNS.SENSOR_DATA.
ptrDataPointer to the 32-bit data array to be copied into the SNS.SENSOR_DATA.
dataSizeThe size of the data array (in 32-bit words).
Returns
Returns the status of the operation cy_en_msclp_status_t