Quantcast
Channel: Infineon Forums
Viewing all articles
Browse latest Browse all 9892

XMC Phase - Shifted Carrier Set up

$
0
0
Dear all,

At the moment I am playing with the XMC4400 and I have the timer slices 0, 1 and 3 of Timer Module 0 running

according to example 3 of AP32288: CU8 initialization for 3 phase motor drive.

Everying is working as expected.

What I want to do now, is to introduce a phase shift between the carriers by changing the initial value of the Timer as following at the beguining of the main:

XMC_CCU8_SLICE_SetTimerValue(SLICE00_PTR, 200U);
XMC_CCU8_SLICE_SetTimerValue(SLICE01_PTR, 500U);
XMC_CCU8_SLICE_SetTimerValue(SLICE03_PTR, 1000U);

/* Set period match value of the timer module1 */
XMC_CCU8_SLICE_SetTimerPeriodMatch(SLICE00_PTR, 1499U);
XMC_CCU8_SLICE_SetTimerPeriodMatch(SLICE01_PTR, 1499U);
XMC_CCU8_SLICE_SetTimerPeriodMatch(SLICE03_PTR, 1499U);

for some reason the Period is set correctly but not the Timer value, and when I read it, after having set the value, I get the value 0:

A = XMC_CCU8_SLICE_GetTimerValue(SLICE00_PTR);

Can anyone help me with this ? How do I set the initial Timer value that I want correnctly in order to optain the desired phase-shift?

Thank you very much! :)

Viewing all articles
Browse latest Browse all 9892

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>