Infineon MOTIX™ MCU TLE988x/9x Device Family SDK
Macros | Functions | Variables
SCU_api

Detailed Description

Macros

#define MULTIPLIER_US_TO_TICKS   SCU_fCPU_MHz
 Multiplier can use fCPU in MHz directly (Mhz <-> us) More...
 

Functions

void SCU_init (void)
 Initialize the SCU module. More...
 
sint8 SCU_initClk (void)
 Initialize the SCU clock. More...
 
sint8 SCU_checkXTALDiagnosis (void)
 Check XTAL Diagnosis as describen in the User Manual. More...
 
void SCU_delay_us (uint32 u32_time_us)
 Delays the regular program execution by a given number of Microseconds. More...
 
void SCU_initSysTick (uint32 u32_value)
 Initialize the SysTick. More...
 
sint8 SCU_enSafeSwitchOffSeq (void)
 Configure the Safe Switch-Off release sequence (SSO release sequence) More...
 
void SCU_enterDeepSleepMode (void)
 Enter the Deep Sleep mode. More...
 
sint8 SCU_enterStopMode (void)
 Enter the Stop mode. More...
 
void SCU_enterSleepMode (void)
 Enter the Sleep mode. More...
 
INLINE uint8 SCU_GetXTALFailSts (void)
 Get the XTAL Fail Status. More...
 
INLINE uint8 SCU_GetPLL0LockSts (void)
 Get the PLL0 Lock Status. More...
 
INLINE uint8 SCU_GetPLL1LockSts (void)
 Get the PLL1 Lock Status. More...
 
INLINE uint32 SCU_getSysTickCntVal (void)
 Get the current SysTick Count Value. More...
 
INLINE uint32 SCU_getSysTickRelVal (void)
 Get the current SysTick Reload Value. More...
 
INLINE void CACHE_setCleanAll (void)
 Set Cache clean All. More...
 
INLINE void CACHE_setLockBlock (uint32 u32_value)
 Set Address of Cache lock Block. More...
 
INLINE void CACHE_setTouchBlock (uint32 u32_value)
 Set Address of Cache touch Block (load Block to Cache) More...
 
INLINE void CACHE_setUnlockBlock (uint32 u32_value)
 Set Address of Cache unlock Block. More...
 
INLINE void CACHE_setCleanSet (uint32 u32_value)
 Set Address of Cache clean Set. More...
 

Variables

sint8 e_xtalSts
 XTAL status. More...
 

Macro Definition Documentation

◆ MULTIPLIER_US_TO_TICKS

#define MULTIPLIER_US_TO_TICKS   SCU_fCPU_MHz

Multiplier can use fCPU in MHz directly (Mhz <-> us)

Function Documentation

◆ CACHE_setCleanAll()

INLINE void CACHE_setCleanAll ( void  )

Set Cache clean All.

◆ CACHE_setCleanSet()

INLINE void CACHE_setCleanSet ( uint32  u32_value)

Set Address of Cache clean Set.

Parameters
u32_valueAddress of Cache clean Set

◆ CACHE_setLockBlock()

INLINE void CACHE_setLockBlock ( uint32  u32_value)

Set Address of Cache lock Block.

Parameters
u32_valueAddress of Cache lock Block

◆ CACHE_setTouchBlock()

INLINE void CACHE_setTouchBlock ( uint32  u32_value)

Set Address of Cache touch Block (load Block to Cache)

Parameters
u32_valueAddress of Cache touch Block (load Block to Cache)

◆ CACHE_setUnlockBlock()

INLINE void CACHE_setUnlockBlock ( uint32  u32_value)

Set Address of Cache unlock Block.

Parameters
u32_valueAddress of Cache unlock Block

◆ SCU_checkXTALDiagnosis()

sint8 SCU_checkXTALDiagnosis ( void  )

Check XTAL Diagnosis as describen in the User Manual.

Returns
sint8 0: success, <0: error codes

◆ SCU_delay_us()

void SCU_delay_us ( uint32  u32_time_us)

Delays the regular program execution by a given number of Microseconds.

the function returns if the given time has elapsed

Too small delay times are being falsified by execution time

of the function itself

Warning
Handle this function with care, as the watchdog will not be serviced during the delay time.
The user has to take care of WDT1/WDT service by himself.
Parameters
u32_time_usDelay time in Microseconds

Example

This example sets a delay of 100 us.

void Example_Function(void)
{
}
void SCU_delay_us(uint32 u32_time_us)
Delays the regular program execution by a given number of Microseconds.
Definition: scu.c:315

◆ SCU_enSafeSwitchOffSeq()

sint8 SCU_enSafeSwitchOffSeq ( void  )

Configure the Safe Switch-Off release sequence (SSO release sequence)

Returns
sint8 0: success, <0: error codes

◆ SCU_enterDeepSleepMode()

void SCU_enterDeepSleepMode ( void  )

Enter the Deep Sleep mode.

◆ SCU_enterSleepMode()

void SCU_enterSleepMode ( void  )

Enter the Sleep mode.

Note
Before entering sleep mode, you can store data in the GPUDATAx [x=0..2] registers.

◆ SCU_enterStopMode()

sint8 SCU_enterStopMode ( void  )

Enter the Stop mode.

Returns
sint8 0: success, <0: error codes

◆ SCU_GetPLL0LockSts()

INLINE uint8 SCU_GetPLL0LockSts ( void  )

Get the PLL0 Lock Status.

Returns
PLL0 Lock Status (0: not locked, 1: locked)

◆ SCU_GetPLL1LockSts()

INLINE uint8 SCU_GetPLL1LockSts ( void  )

Get the PLL1 Lock Status.

Returns
PLL1 Lock Status (0: not locked, 1: locked)

◆ SCU_getSysTickCntVal()

INLINE uint32 SCU_getSysTickCntVal ( void  )

Get the current SysTick Count Value.

Returns
current SysTick Count Value

◆ SCU_getSysTickRelVal()

INLINE uint32 SCU_getSysTickRelVal ( void  )

Get the current SysTick Reload Value.

Returns
SysTick Reload Value

◆ SCU_GetXTALFailSts()

INLINE uint8 SCU_GetXTALFailSts ( void  )

Get the XTAL Fail Status.

Returns
XTAL Fail Status (0: no Fail, 1: Fail)

◆ SCU_init()

void SCU_init ( void  )

Initialize the SCU module.

◆ SCU_initClk()

sint8 SCU_initClk ( void  )

Initialize the SCU clock.

If configured in Config Wizard, the function initializes

  • XTAL
  • PLL0
  • PLL1

In case of an XTAL error, the XTAL error status is stored in the global variable e_xtalSts

The function always initializes

  • fSYS0 (for core and peripherals except UART, CAN)
  • fSYS1 (for UART, CAN)
Returns
sint8 0: success, <0: error codes

◆ SCU_initSysTick()

void SCU_initSysTick ( uint32  u32_value)

Initialize the SysTick.

Parameters
u32_valueSysTick Reload Value

Variable Documentation

◆ e_xtalSts

sint8 e_xtalSts
extern

XTAL status.