Trigonometric functions are commonly used in real-time control applications, particularly within the inner loops of control algorithms, where speed and accuracy is essential. The performance of trigonometric functions is a key careabout for designers of these systems as it can have a significant impact on the overall performance of the system. Until recently, trignometric functions based on lookup tables were considered faster than the polynomial-based methods; however, with the inclusion of floating-point units (FPUs) and faster clock speeds, polynomial-based approximations have gained favor. TI has developed C functions of the most commonly used trigonometric functions using these polynomial-based methods and has optimized them for TI's ArmĀ®-based microcontrollers (MCUs) and microprocessors (MPUs).
Supports Below trignometric functions (ti_arm_trig):
NA
App Note: Optimized Trigonometric Functions on TI Arm Cores
Addintionally, TI also offers a traditional Look-up Table based trigonometric functions for users needing the most optimized operation with the trade-off of increase data size (3344Bytes of LUT stored in .trigData). It also bypasses some limitations of the aforementioned TI Arm Trig libary such as the limited input range of 0 - 2PI for sine/cosine functions. Furthermore, the Fast Run-Time-Support (FastRTS) library also offers an optimized math operation of logs and exponents.
Supports Below trignometric and math functions (fastrts):
NA
MCU PLUS SDK integrates a software library to use the TMU (Trigonometric Math Unit) hardware in AM263Px. This TMU library provides efficient (assembly level functions) and MATHLIB compatible API interface for performing trigonometric calculations, a critical component in many real-time applications such as Motor Control and Digital Power.
TMU library supports below trignometric and math functions (ti_arm_tmu):
Additionally, the TMU assmebly code integrated with the SDK makes use of one operation specific register and it's corresponding result register. To make use of a different register then the one used by SDK, users can add API calls in the TMU source file pointing to another register. Or they can make a direct write to the Operation specific register in their application code as follows:
HWREG(x) = input value /add delay for computation to complete/ result = HWREG(y) Here, x is the address of the TMU specific operation registers and y is the address of the result register