AM62Px MCU+ SDK  09.02.01
MTOG Low-Level API

Introduction

This module contains the Low-Level APIs to program and use the MTOG module.

Functions

int32_t SDL_MTOG_getBaseaddr (SDL_MTOG_Inst instance, uint32_t *baseAddr)
 This API is used to get the base address of the instance. More...
 

Typedefs

typedef uint8_t SDL_MTOG_Inst
 MTOG Instance supported. More...
 

Macros

#define SDL_INSTANCE_WKUP_MTOG0   1U
 
#define SDL_INSTANCE_WKUP_MTOG1   2U
 
#define SDL_INSTANCE_MTOG_MAX   (SDL_INSTANCE_WKUP_MTOG1 + 1U)
 

Timeout values

This enumerator defines the possible timeout values

typedef uint32_t SDL_MTOGVal
 
#define SDL_MTOG_VAL_1K   ((uint32_t) 0U)
 
#define SDL_MTOG_VAL_4K   ((uint32_t) 1U)
 
#define SDL_MTOG_VAL_16K   ((uint32_t) 2U)
 
#define SDL_MTOG_VAL_64K   ((uint32_t) 3U)
 
#define SDL_MTOG_VAL_256K   ((uint32_t) 4U)
 
#define SDL_MTOG_VAL_1M   ((uint32_t) 5U)
 
#define SDL_MTOG_VAL_2M   ((uint32_t) 6U)
 
#define SDL_MTOG_VAL_4M_MINUS_1   ((uint32_t) 7U)
 
int32_t SDL_MTOG_setTimeoutVal (SDL_MTOG_Regs *pRegs, SDL_MTOGVal timeOut)
 Set the timeout value. More...
 

Macro Definition Documentation

◆ SDL_MTOG_VAL_1K

#define SDL_MTOG_VAL_1K   ((uint32_t) 0U)

1024 clock cycles

◆ SDL_MTOG_VAL_4K

#define SDL_MTOG_VAL_4K   ((uint32_t) 1U)

4096 clock cycles

◆ SDL_MTOG_VAL_16K

#define SDL_MTOG_VAL_16K   ((uint32_t) 2U)

16,384 clock cycles

◆ SDL_MTOG_VAL_64K

#define SDL_MTOG_VAL_64K   ((uint32_t) 3U)

65,536 clock cycles

◆ SDL_MTOG_VAL_256K

#define SDL_MTOG_VAL_256K   ((uint32_t) 4U)

262,144 clock cycles

◆ SDL_MTOG_VAL_1M

#define SDL_MTOG_VAL_1M   ((uint32_t) 5U)

1,048,576 clock cycles

◆ SDL_MTOG_VAL_2M

#define SDL_MTOG_VAL_2M   ((uint32_t) 6U)

2,097,152 clock cycles

◆ SDL_MTOG_VAL_4M_MINUS_1

#define SDL_MTOG_VAL_4M_MINUS_1   ((uint32_t) 7U)

4,194,303 clock cycles

◆ SDL_INSTANCE_WKUP_MTOG0

#define SDL_INSTANCE_WKUP_MTOG0   1U

WKUP_MTOG0

◆ SDL_INSTANCE_WKUP_MTOG1

#define SDL_INSTANCE_WKUP_MTOG1   2U

MAX Instance MTOG

◆ SDL_INSTANCE_MTOG_MAX

#define SDL_INSTANCE_MTOG_MAX   (SDL_INSTANCE_WKUP_MTOG1 + 1U)

MAX Instance MTOG

Typedef Documentation

◆ SDL_MTOGVal

typedef uint32_t SDL_MTOGVal

◆ SDL_MTOG_Inst

typedef uint8_t SDL_MTOG_Inst

MTOG Instance supported.

Function Documentation

◆ SDL_MTOG_setTimeoutVal()

int32_t SDL_MTOG_setTimeoutVal ( SDL_MTOG_Regs pRegs,
SDL_MTOGVal  timeOut 
)

Set the timeout value.

This function sets the desired timeout value. This function should only be called when the timeout is disabled.

Parameters
pRegs[IN] Pointer to the desired VBUSM Master Timeout Gasket Control register
timeOut[IN] Timeout count value. See SDL_MTOGVal for a list of valid timeout values.
Returns
SDL_PASS Function completed successfully SDL_EFAIL Timeout value cannot be set when the timeout counter is running. Call SDL_MTOG_reset first. SDL_EBADARGS pRegs is NULL

◆ SDL_MTOG_getBaseaddr()

int32_t SDL_MTOG_getBaseaddr ( SDL_MTOG_Inst  instance,
uint32_t *  baseAddr 
)

This API is used to get the base address of the instance.

Parameters
instanceTOG instance
baseAddrBase address of the instance.
Returns
status return the base address of the instance. SDL_PASS: success SDL_EBADARGS: failure, indicate translation failed