Other Parts Discussed in Thread: C2000WARE
Tool/software: Code Composer Studio
I've been trying to implement a function call to CLAatan2() and am having a difficult time figuring out why it only ever returns the value 0.0. The example atan2PU from the CLAmath folder seems to work properly, however.
The CLA task is triggered successfully and executes the code contained in the Cla1Task1 interrupt. I first thought that I had an issue with the CLAmath library, but other functions such as sin and cos behave as expected. My next thought was that there was something wrong with aTan2 in particular because it uses a table loaded in ROM (my MCU is revision C, which the TRM leads me to believe contains this feature). However, the function CLAexp() also uses a table and executes successfully. The function CLAexp2() does not, always returning 1.0, which leads me back to the idea that there is an issue with the table (since the expansion of exp has a 1 prior to anything that would come from a table).
When I open a memory viewer and look at the CLAatan2Table, it's full of zeros, but this is also true when I am running the example or if I use the function CLAasin(), which both yield correct values.
I am using the library from C2000Ware, so I think that it is up to date (v4.02.00.00). Does anybody know if there is something about the arctangent functions that is easy to get tripped up on, or is it more likely that I just have an error in, e.g. linker settings that would cause some of the trig functions to behave differently than others?
Additionally, should I expect non zero values when looking at the memory viewer for the table in question?
Any insight would be appreciated, thanks.