Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

AURIX™ Forum Discussions

User22686
Level 1
10 sign-ins 5 replies posted 5 questions asked
Level 1

Hello,

I am currently working on writing some PWM code to generate three-phase high and low side PWM using the CCU6 module. I have managed to get the 3-phase PWM working successfully, but I am struggling to generate a trigger signal using the T13 timer.

I have added in the following code which I believe should configure the trigger:

#define CCU6_COUT3 &IfxCcu61_COUT63_P00_10_OUT

// Configure the T13 trigger - used as a trigger for the EDSADC.
timer_conf.triggerOut = CCU6_COUT3;
// Enable the trigger
timer_conf.base.trigger.enabled = TRUE;
// Enable the trigger output
timer_conf.base.trigger.outputEnabled = TRUE;
timer_conf.base.trigger.risingEdgeAtPeriod = TRUE;
timer_conf.base.trigger.triggerPoint = 0;

// Configure the timer's base frequency to be the one desired.
timer_conf.base.frequency = g_freq * 1000;
// The timer should count up and down (i.e. producing a triangle wave) so
// that centre-aligned PWM is generated.
timer_conf.base.countDir = IfxStdIf_Timer_CountDir_upAndDown;

// Initialise the timer driver
IfxCcu6_TimerWithTrigger_init(&g_timer, &timer_conf);

However, the voltage at P00.10 remains at 3.3V, and there are no trigger pulses produced.

I am wondering whether I have missed anything out as part of the initialisation? If there are any examples, it would be very appreciated if you could point me to these.

Kind regards,

Finn

0 Likes
3 Replies
dw
Moderator
Moderator 250 sign-ins 100 solutions authored First question asked
Moderator

Dear User,

Please refer to below example for 3pins output PWM.

https://www.infineon.com/dgdl/Infineon-AURIX_CCU6_PWM_Generation_1_KIT_TC397_TFT-Training-v01_01-EN....

https://github.com/Infineon/AURIX_code_examples/tree/master/code_examples/CCU6_PWM_Generation_1_KIT_...

    /* Assign output pins */
    pwmHlConf.cc0 = &IfxCcu60_CC60_P02_0_OUT;
    pwmHlConf.cc1 = &IfxCcu60_CC61_P02_2_OUT;
    pwmHlConf.cc2 = &IfxCcu60_CC62_P02_4_OUT;
    pwmHlConf.cout0 = &IfxCcu60_COUT60_P02_1_OUT;
    pwmHlConf.cout1 = &IfxCcu60_COUT61_P02_3_OUT;
    pwmHlConf.cout2 = &IfxCcu60_COUT62_P02_5_OUT;

dw

0 Likes
User22686
Level 1
10 sign-ins 5 replies posted 5 questions asked
Level 1

Hello,

Thanks for this - I have no problem with generating the 3-phase PWM with complementary outputs - I currently have this working right now. However, it is generating an external trigger signal that I am having difficulty with. I want to do this to generate a signal to trigger the EDSADCs and other external components.

I hope this makes it clear what I am trying to do.

Kind regards,

Finn

0 Likes