Resolver interface Using eTPU API

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Resolver interface Using eTPU API

674 Views
jangpr
Contributor I

I want to use resolver interface using eTPU in MPC5676R.

I want to generate a square wave using the fs_rslv_init function according to AN3943 documentation.

I initialized it as shown in the document, but no square wave is generated. The code is written as below. I would like to know if there are any additional settings to make square waves here.

SIU.PCR[126].R = 0x0603;

err_code = fs_etpu_rslv_init (12,/* engine: A; channel: 12 */
                                             FS_ETPU_PRIORITY_LOW,/* priority: Low */
                                               FS_ETPU_RSLV_MODE_MASTER ,/* mode: FS_ETPU_RSLV_MODE_MASTER*/
                                             10000,/* period: 10000 */
                                             5000,/* duty: 5000 */
                                             7500,/* delay: 2500 */

                                             -3056,/* start_offset: -3056 */
                                             0, //Sample delay

                                             10,/* scale: 10 */
                                             10,/* scale: 10 */
                                             0x002B851E, /* dc_offset */
                                             0x002B851E, /* dc_offset */
                                             0,/* link_chan: 0 */
                                             0,/* rate_irq: 0 */
                                             0,/* rate_link: 0 */
                                             0x005E87CE,/* k1_d: 0x004056fe */
                                             8,/* k1_scale: 8 */
                                             0x00433A20,/* k2_d: 0x00517cc2 */
                                             8);/* k2_scale: 3 */

if (err_code != 0)
{
      return (err_code);
}

Tags (4)
0 Kudos
1 Reply

491 Views
kajolvarma
Contributor I

Hi,

I am also working on the resolver with the same api and have some questions regarding this

How to calculate the values of K1 and K2?

0 Kudos