TMS320F28P650DK: Help Understanding Fast RTS Library Example for cos(pi) Calculation

Part Number: TMS320F28P650DK
Other Parts Discussed in Thread: C2000WARE, SYSCONFIG

Tool/software:

Hi,
I am currently exploring the Fast RTS library for TMS320f28p65, and I am new to the Fast RTS library. I am trying to test it with a simple calculation: cos(pi).

I found the Cos example at:  C:\ti\c2000\C2000Ware_5_04_00_00\libraries\math\FPUfastRTS\c28\examples\cos_f32

However, I'm a bit confused by this example for two reasons:
1- Multiple .c files: I see several source files in the example folder, but I can't clearly identify where and how the actual cos(pi) calculation is performed. Could you point me to the relevant part of the code or explain how to modify it to test cos(pi)?

2- No SysConfig integration: I noticed that this example doesn't use SysConfig. Since SysConfig simplifies configuration and setup, I'm wondering if there's a recommended way to integrate Fast RTS examples with SysConfig, or if there's a reason it's not used here.

If you have any suggestion example or any guidance or clarification would be greatly appreciated!

My Code Composer Studio Version: 12.8.1.00005

  • Hi ,

    1- Multiple .c files: I see several source files in the example folder, but I can't clearly identify where and how the actual cos(pi) calculation is performed. Could you point me to the relevant part of the code or explain how to modify it to test cos(pi)?

    Fastrts_cosine.c is what has the cos calculations --> check FastRTS_runTest().  The actual operation of cos is referenced from libraries\math\FPUfastRTS\c28\source\fpu32\cos_f32.asm which is part of the rts2800_fpu32_...lib functions which are included in the project properties of the example. 

    2- No SysConfig integration: I noticed that this example doesn't use SysConfig. Since SysConfig simplifies configuration and setup, I'm wondering if there's a recommended way to integrate Fast RTS examples with SysConfig, or if there's a reason it's not used here.

    The older examples did not use sysconfig . Check C2000ware v6.0 , we have new sysconfig based examples for these.  C:\ti\c2000\C2000Ware_6_00_00_00\libraries\math\FPUfastRTS\c28\examples\28e12x_cos_f32. The device can be switched to the P65x device.

    Regards.

  • Thanks  for your response.

    In cos_f32 example, can I remove all golden.c, input.c, fastrts_examples_setup.c, fastrts_examples_main.c from this project. Then make only a main.c (like other projects) and use cosf(pi)?

  • Hi ,

    The golden.c, input.c files are mainly used for checking the pass/fail of the examples. Input.c is today used for giving the cos(input) but if you are looking to use something local like the Pi only then yes it can be removed. The fastrts_examples_setup.c, fastrts_examples_main.c are mainly for Init of the device etc , the 28e12x_cos_f32. example gets rid of these 2 files so you could reference that Fastrts_cosine.c instead.

    Regards.