library routine for 82726

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

library routine for 82726

613 Views
selvakumarm
Contributor II


Dear Sir,

 

For dsc 56F827xx , is there any library function for calculating modulus value.

 

Thanks & Regards

Selvakumar

Labels (1)
0 Kudos
3 Replies

404 Views
TICS_Fiona
NXP Employee
NXP Employee

Hello Selvakumar,

Are you looking for a library function to get the modulus value of a complex number? Sorry that CodeWarrior for DSC does not include such library function, but it supports sqrt() function for both fixed-point and floating-point.

The fixed-point math functions are supplied by Processor Expert.  The component DSP_Func_TFR and DSP_Func_MFR implement trigonometric functions. Please refer to the Processor Expert help pages for the use of this component.

The functions for sqrt() in component DSP_Func_MFR is mfr16Sqrt() and mfr32Sqrt(). The description for PE's math functions are contained in the file "DspFunc.pdf", you can find this file under the directory:

C:\Freescale\CW MCU v10.6.4\MCU\ProcessorExpert\DOCs\FreescaleSDK\Beans\DspFunc

For floating point math functions, C compiler library has support for C99 functions, including trigonometric,  hyperbolic, power, absolute value functions, exponential and logarithmic functions.

In order to use double precision function versions, one has to make use of   libraries that support long long and double data types (name includes SLLD) and use slld on option to compile the project in CodeWarrior v10.6, for details, please see below:

(1)  Add the '-flag slld' in 'Other Flags' field on the panel < DSP Compiler->Language >. You have found this in the project settings.

(2) make use of precompiled MSL and runtime support libraries suffixed with _SLLD (e.g. use "MSL C 56800E smm_SLLD.lib" instead "MSL C 56800E smm.lib" and "runtime 56800E smm_SLLD.lib" instead"runtime 56800E smm.lib")

(3) add  * (ll_engine.text) to code section in linker command file

Hope this helps!

Best Regards

Fiona Kuang

Technical Information & Commercial Support

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

404 Views
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Selvakumar,

Could you tell us which CodeWarrior version are you using?

Thanks in advance!

Best Regards,

Carlos Mendoza

Technical Support Engineer

0 Kudos

404 Views
selvakumarm
Contributor II

CW MCU v10.6 (eclipse)

with Regards,

Selvakumar

0 Kudos