![]() |
Infineon MOTIX™ MCU TLE985x Device Family SDK
|
Go to the source code of this file.
MATH DIV low level access library.
Enumerations | |
enum | TMath_Sus_Cfg { Ch_MATH_Sus_Off = 0u , Ch_MATH_Sus_Hard = 1u , Ch_MATH_Sus_Soft = 2u } |
This enum lists the MATH Suspend Mode. More... | |
enum | TMath_Chain_Cfg { Ch_MATH_Chain_Off = 0u , Ch_MATH_Chain_QUOT = 1u , Ch_MATH_Chain_RMD = 2u } |
This enum lists the MATH Chain Configuration. More... | |
enum | TMath_DIVMode_Cfg { Ch_MATH_DIVMode_32_32 = 0u , Ch_MATH_DIVMode_32_16 = 1u , Ch_MATH_DIVMode_16_16 = 2u } |
This enum lists the MATH Division Configuation. More... | |
enum | TMath_STMode_Cfg { Ch_MATH_STMode_Auto = 0u , Ch_MATH_STMode_Manual = 1u } |
This enum lists the MATH Start MOde Configuation. More... | |
Functions | |
void | MATH_Init (void) |
Initializes the math divider module. More... | |
INLINE void | MATH_DIV_START (void) |
Starts the division operation. More... | |
INLINE uint8 | MATH_BSY_Sts (void) |
Reads the Busy Indication. More... | |
INLINE void | MATH_DIVEOC_Int_Clr (void) |
Clears the Divider End of Calculation Event Flag. More... | |
INLINE void | MATH_DIVERR_Int_Clr (void) |
Clears the Divider Error Event Flag. More... | |
INLINE void | MATH_DIVEOC_Int_En (void) |
Enables the Divider End of Calculation Interrupt. More... | |
INLINE void | MATH_DIVEOC_Int_Dis (void) |
Disables the Divider End of Calculation Interrupt. More... | |
INLINE void | MATH_DIVERR_Int_En (void) |
Enables the Divider Error Interrupt. More... | |
INLINE void | MATH_DIVERR_Int_Dis (void) |
Disables the Divider Error Interrupt. More... | |
INLINE void | MATH_Suspend_Conf (TMath_Sus_Cfg MATH_SUS_Cfg) |
Sets the Suspend Configuration. More... | |
INLINE void | MATH_DVS_Chain (TMath_Chain_Cfg MATH_CHAIN_Cfg) |
Sets the Divisor Chaining. More... | |
INLINE void | MATH_DVD_Chain (TMath_Chain_Cfg MATH_CHAIN_Cfg) |
Sets the Dividend Chaining. More... | |
INLINE void | MATH_DVS_Set (uint32 VALUE) |
Sets the Divisor Value. More... | |
INLINE void | MATH_DVD_Set (uint32 VALUE) |
Sets the Dividend Value. More... | |
INLINE uint32 | MATH_DVS_Read (void) |
Reads the Divisor Value. More... | |
INLINE uint32 | MATH_DVD_Read (void) |
Reads the Dividend Value. More... | |
INLINE uint32 | MATH_QUOT_Read (void) |
Reads the Quotient Value. More... | |
INLINE uint32 | MATH_RMD_Read (void) |
Reads the Remainder Value. More... | |
INLINE void | MATH_DIVMODE_Set (TMath_DIVMode_Cfg MATH_DIVMODE_Cfg) |
Sets the Division Mode. More... | |
INLINE void | MATH_STMODE_Set (TMath_STMode_Cfg MATH_STMODE_Cfg) |
Sets the Start Mode. More... | |
INLINE uint8 | MATH_DIVMODE_Read (void) |
Reads the Division Mode. More... | |
INLINE uint8 | MATH_STMODE_Read (void) |
Reads the Start Mode. More... | |
enum TMath_Chain_Cfg |
enum TMath_DIVMode_Cfg |
enum TMath_STMode_Cfg |
enum TMath_Sus_Cfg |
Reads the Busy Indication.
Example
This example waits until finishing the division operation.
INLINE void MATH_DIV_START | ( | void | ) |
Starts the division operation.
Example
This example starts the calculation of the division operation when it is configured manually.
INLINE void MATH_DIVEOC_Int_Clr | ( | void | ) |
Clears the Divider End of Calculation Event Flag.
Example
This example treats the Divider End of Calculation Interrupt.
INLINE void MATH_DIVEOC_Int_Dis | ( | void | ) |
Disables the Divider End of Calculation Interrupt.
Example
This example treats the Divider End of Calculation Interrupt.
INLINE void MATH_DIVEOC_Int_En | ( | void | ) |
Enables the Divider End of Calculation Interrupt.
Example
This example treats the Divider End of Calculation Interrupt.
INLINE void MATH_DIVERR_Int_Clr | ( | void | ) |
Clears the Divider Error Event Flag.
Example
This example treats the Divider Error Interrupt.
INLINE void MATH_DIVERR_Int_Dis | ( | void | ) |
Disables the Divider Error Interrupt.
Example
This example treats the Divider Error Interrupt.
INLINE void MATH_DIVERR_Int_En | ( | void | ) |
Enables the Divider Error Interrupt.
Example
This example treats the Divider Error Interrupt.
Reads the Division Mode.
Example
This example reads the Division Mode.
INLINE void MATH_DIVMODE_Set | ( | TMath_DIVMode_Cfg | MATH_DIVMODE_Cfg | ) |
Sets the Division Mode.
MATH_DIVMODE_Cfg | MATH Division Mode Configuration, see TMath_DIVMode_Cfg |
Example
This example selects the the 16-16 Division Mode.
INLINE void MATH_DVD_Chain | ( | TMath_Chain_Cfg | MATH_CHAIN_Cfg | ) |
Sets the Dividend Chaining.
MATH_CHAIN_Cfg | MATH Divisor Chaining Configuration, see TMath_Chain_Cfg |
Example
This example selects the RMD register as Dividend Register Result Chaining.
Reads the Dividend Value.
Example
This example configures DVD and DVS to calculate the division operation 25/5 and checks the QUOT and RMD values.
Sets the Dividend Value.
VALUE | Dividend Value |
Example
This example configures DVD and DVS to calculate the division operation 25/5 and checks the QUOT and RMD values.
INLINE void MATH_DVS_Chain | ( | TMath_Chain_Cfg | MATH_CHAIN_Cfg | ) |
Sets the Divisor Chaining.
MATH_CHAIN_Cfg | MATH Divisor Chaining Configuration, see TMath_Chain_Cfg |
Example
This example selects the QUOT register as Divisor Register Result Chaining.
Reads the Divisor Value.
Example
This example configures DVD and DVS to calculate the division operation 25/5 and checks the QUOT and RMD values.
Sets the Divisor Value.
VALUE | Divisor Value |
Example
This example configures DVD and DVS to calculate the division operation 25/5 and checks the QUOT and RMD values.
void MATH_Init | ( | void | ) |
Initializes the math divider module.
Reads the Quotient Value.
Example
This example configures DVD and DVS to calculate the division operation 25/5 and checks the QUOT and RMD values.
Reads the Remainder Value.
Example
This example configures DVD and DVS to calculate the division operation 25/5 and checks the QUOT and RMD values.
Reads the Start Mode.
Example
This example starts the calculation of the division operation when it is configured manually.
INLINE void MATH_STMODE_Set | ( | TMath_STMode_Cfg | MATH_STMODE_Cfg | ) |
Sets the Start Mode.
MATH_STMODE_Cfg | MATH Start Mode Configuration, see TMath_STMode_Cfg |
Example
This example starts the calculation of the division operation when it is configured manually.
INLINE void MATH_Suspend_Conf | ( | TMath_Sus_Cfg | MATH_SUS_Cfg | ) |
Sets the Suspend Configuration.
MATH_SUS_Cfg | MATH Suspend Configuration, see TMath_Sus_Cfg |
Example
This example configures the Suspend Mode to hard suspend.