- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Labels:
-
AURIX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear User,
Please refer to below example for 3pins output PWM.
/* 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Finn,
Have you refered above example?
You could download the code from here: