This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL-F28379D: Is there a sinewave look-up table on F28379D's on-chip memory?

Part Number: LAUNCHXL-F28379D
Other Parts Discussed in Thread: C2000WARE

Hello,

I know there is a sinewave look-up table on F28335's on-chip memory, but I'm not sure if there's one on F28379D's. Could you tell me if there's a sinewave look-up table on F28379D's on-chip memory? And if there's one, tell me the starting address please. I've searched the Technical Reference Manual and the datasheet. Thank you.

  • F28335 contained a sine table in ROM which was used to accelerate functions in the IQ math library.  On F2837x devices, these tables are not located in ROM so must be loaded into RAM by the user.  There are example linker command files to do this in C2000Ware:

    C:\ti\c2000\C2000Ware_2_00_00_03\device_support\f2837xd\common\cmd  

    BTW, you may already know the F2837x has support for sin() in the instruction set, so sine wave generation is mach easier and faster.  Depending on what you are doing you may not need a look-up table.

    Regards,

    Richard

  • Thanks for your reply.

    What I want to do is to generate a sinewave-modulated PWM on F28379D. I have tested TI's example code on F28335 which uses the on-chip sinewave-lookup table and IQmath and it works fine. When I turn to F28379D, I don't know how handle the sinewave generation issue. Now I know the F28379D doesn't provide the on-chip sinewave look-up table.

    As for the sin() instruction, I don't get what you mean. Do you mean using the assembly instruction in C or do you mean I can use the sin() funciton provided in math.h? I wonder using the sin() function will slow down the speed.

    Regards,

    Fang

  • Fang,

    You can still use the IQmath look up tables, it's just that you'll have to allocate memory space for them.  It's pretty straightforward if you follow what's been done in the C2000Ware examples.

    Your are right that RTS library support for sinf() will be very slow, but what I was getting at in my last post was that computing sine is fast on this device because there's support for it in the instruction set.  In C, you could use the __sinpuf32 intrinsic to compute a normalized sine wave from an angle counter.  It's fast (4 cycles), and you won't need memory for the look up table.

    Regards,

    Richard

  • Hi Richard,

    Sorry for the late reply. Following your advice, I've worked it out. Thanks a lot.

    Regards

    Fang