MPC5643L SWG Module Synchronization/ Resolver Interface

cancel
Showing results for 
Search instead for 
Did you mean: 

MPC5643L SWG Module Synchronization/ Resolver Interface

Jump to solution
844 Views
sunyang0736
Contributor I

Hi everyone, 

I met a problem with the SWG (Sine wave generator) module with the MPC5643L processor. I want to use this module to generate 10kHz excitation wave for a resolver. As we know the frequency of the excitation signal and sample frequency of the ADC must be exactly the same.

As the output frequency of the SWG is described by the reference manual as: 

pastedImage_1.png

And 1048576 is only divisible by 2, in order to get an exactly same frequency as sampling frequency, the IOFREQ must also be only divisible by 2. As a result, I can only generate limited frequency sine waves which are pretty far away from 10kHz (eg. 7.3K and 14.6K). 

If I want keep a ~10kHz sampling frequency. Is there any methods to synchronize the excitation sine wave with ADC sampler, or do I have any other way to generate 10kHz excitation sine wave for the resolver instead of using SWG module?   

Thanks,

Yang Sun

Labels (1)
0 Kudos
1 Solution
701 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi Yang,

in fact it is impossible to synchronize FlexPWM/CTU/ADC and SWG to any user defined frequency. I guess the 10Khz cannot be achieve by both. However you may set up for some “close” frequency (9.765625Khz). I have created the excel sheet which helps you to find proper setting.

So please refer to attached example, which shows usage of FlexPWM and SWG modules.

The setting is selected in the way to have a PWM output signal synchronized with SWG output signal.

Hope it helps.

BR, Petr

View solution in original post

0 Kudos
2 Replies
701 Views
sunyang0736
Contributor I

Hi Petr,

Thanks for the answer. Based on your answers, and after carefully review the documents and manuals from NXP, I noticed that the SWG module might not be feasible for the excitation wave generation. I used the PWM module instead.

Thanks,

Yang Sun

0 Kudos
702 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi Yang,

in fact it is impossible to synchronize FlexPWM/CTU/ADC and SWG to any user defined frequency. I guess the 10Khz cannot be achieve by both. However you may set up for some “close” frequency (9.765625Khz). I have created the excel sheet which helps you to find proper setting.

So please refer to attached example, which shows usage of FlexPWM and SWG modules.

The setting is selected in the way to have a PWM output signal synchronized with SWG output signal.

Hope it helps.

BR, Petr

0 Kudos