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.
Hi,
The project I'm currently working on uses the f28069.
I'm using a dummy signal to verify the generated PWM.
However, when I use the sine function, the signal it generates deviates from the sine range.
Below is the function I tested.
test = sin((2 * PI * 416) / 1666);
In theory, its value should be 0.999998, but the actual value I obtained is as shown in the figure below.
I would like to ask if there is any error in my settings?
Best regards.
Dillon
Hello Dillon,
Can you confirm that in stepping through the function which sine function you are calling? Is it from the FPUfastRTS library or a compiler intrinsic? Can you verify the values which are loaded to the registers for the function are operated on correctly? Please also make sure the correct FPU option is selected in the Project Properties for your application.
Hi,
Thank you for your response.
As I was gradually executing the check program, I found an issue occurring at the "sin()" function, where the following error message appeared:
"Can't find a source file at "/home/ubnuser/ti/repos/c2000ware/libraries/math/temp/source/fpu32/sin_f32.asm"
Locate the file or edit the source lookup path to include its location."
Could you please advise on how to change the path or whether I need to add files like "sin_f32.asm" to my project?
Currently, I am configuring for fpu32 and --library "ProjName/lib/rts2800_fpu32_fast_supplement.lib" for usage.
Best regards.
Dillon
Hello Dillon,
As I was gradually executing the check program, I found an issue occurring at the "sin()" function, where the following error message appeared:
"Can't find a source file at "/home/ubnuser/ti/repos/c2000ware/libraries/math/temp/source/fpu32/sin_f32.asm"
This error message is simply because the source file for the function is not actively available within the project, this does not indicate any functional problem with the program and you should still be able to step through the assembly code in the Disassembly window. Unfortunately, this will be the only way to step through the code at this point in your application.
Hi Omer,
Thank you for your response.
SO is there any other method to achieve my goal?
Perhaps I should create sine table?
Best regards.
Dillon
Hello Dillon,
SO is there any other method to achieve my goal?
Perhaps I should create sine table?
Based on your last response about not being able to see the source file, I don't have any information about the actual problem you're seeing (i.e. which register is receiving an incorrect value set to it, if the incorrect function is called, if conditionals are not being checked properly, etc.). You need to be able to step through your code and find out what is going wrong. The solution of using a sine table may or may not help, but I don't know what problem you're seeing to be able to determine that.