SPRAD20 March 2022 AM2634 , AM2634-Q1
The software resolver is implemented similar to C28 in TIDM-02009. There are two functions listed as the following. Line 1 is to initialize resolver structure, and line 2 is to compute angle and speed. After initialize the structure, implementation details need to be updated according to features of resolver hardware. More details can be found in the structure definition.
It is worth attention that there are many ways to implement math functions like sin/cos. In this implementation, sin/cos functions for resolver phase lock loop inputs are moved out of "resolver_run" so that it is easier to find out all math functions and make changes. The following line 1 and 2 must be called before the above line 2. Standard C library functions are used here as an example.