对于 HSPDM 部分,我将其配置为由 CCU6 触发:
IfxHspdm_setHwRunActiveEdge(g_hspdm,
IfxHspdm_HwRunActiveEdge_rising);
IfxHspdm_setHwRunTriggerSource(g_hspdm, IfxHspdm_HwTriggerSource_CCU6);
IfxHspdm_enableHwRun(g_hspdm);
对于 CCU6 而言,看起来 CCU61 的 T13 是通往 HWRUN 的路线:
所以我在这里配置了 CCU6:
IfxCcu6_Timer_Config timerConfig; IfxCcu6_Timer_initModuleConfig(
timerConfig, MODULE_CCU61); /* Configure the T12 timer
frequency/period (trigger for T13 timer) and T13 timer frequency/period
(trigger * for ADC). Timer T13 starts counting in single shot mode
triggered by a period-match event of the T12 timer. * The period of
the timer T13 represents a delay (from the period-match event of the T12
timer) of the ADC * trigger event. */
timerConfig.base.t12Frequency = CCU6_T12_TIMER_FREQ; /*
Timer T12 frequency */
timerConfig.base.waitingTime = CCU6_T12_TIMER_PERIOD; /*
waitingTime is the period of T12 timer */
timerConfig.base.t13Frequency = CCU6_T13_TIMER_FREQ; /*
Timer T13 frequency */
timerConfig.base.t13Period = CCU6_T13_TIMER_PERIOD; /*
Timer T13 period */ timerConfig.timer =
IfxCcu6_TimerId_t13; /* Select the timer, T13
is the master */ timerConfig.synchronousOperation = FALSE;
/* Disable synchronous start of the timers */
timerConfig.trigger.t13InSyncWithT12 = TRUE; /*
T12 timer starts the T13 timer */ /* Configure the T13
timer start event */ timerConfig.timer13.t12SyncEvent =
IfxCcu6_T13TriggerEvent_onT12Period;
timerConfig.timer13.t12SyncDirection =
IfxCcu6_T13TriggerDirection_onT12CountingUp; /* Apply the
configuration to the CCU6 module */ IfxCcu6_Timer_initModule(
g_timer, timerConfig); //CCU61:COUT63 to HSPDM:HWRUN(0) T13 PWM
channel 63 /* Activate the line ServiceRequest_3 to route the T13
period match event trigger to the HSPDM module */
IfxCcu6_enableInterrupt( MODULE_CCU61,
IfxCcu6_InterruptSource_t13PeriodMatch); /* Configure the T13 timer
for single shot mode */ IfxCcu6_enableSingleShotMode( MODULE_CCU61,
IfxCcu6_TimerId_t13); IfxCcu6_Timer_start( g_timer);
但是 HSPDM 输出未触发。
我做错了什么? 请帮忙。
共1条
1/1 1 跳转至页
如何在TC357TA中配置CCU6以触发HSPDM?

关键词: TC357TA HSPDM 微控制器
共1条
1/1 1 跳转至页