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-F28P55X: REFGEN Sysconfig Setup Guide

Part Number: LAUNCHXL-F28P55X
Other Parts Discussed in Thread: C2000WARE, SYSCONFIG

Tool/software:

HI.

I encountered the following issue during testing and would like to ask for help: I configured REFGEN to generate a 60 Hz sine wave, but the resulting waveform is a 120 Hz sine wave. Could you please advise how to set it up correctly?

attached the CCS Project file.

Ver 20.2

C2000Ware 5.05

Result out to DAC;

DAC_SIN.zip

  • I noticed you've set the "sample period" to 10 µs in SysConfig. This means you need to call "DCL_getRefgenPhaseA" every 10 µs. In the code you shared, there's a 2 µs delay, which isn't aligning with the correct calling period. Also, using while(1) makes the loop run as quickly as it can, so the actual sample rate isn't guaranteed. The best approach would be to use a CPU timer for this purpose.

    Best Regards,

    Masoud