请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:TMS320F28379S 尊敬的 Champs:
我阅读了以下应用手册: 利用新型 ePWM 功能进行多相控制。 它提到了一个参考设计 TIDA-00961、但它似乎不再存在(我找不到它任何地方)。
我想知道是否有另一个使用 ePWM XLink 的示例?
此致、
基恩
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
尊敬的 Champs:
我阅读了以下应用手册: 利用新型 ePWM 功能进行多相控制。 它提到了一个参考设计 TIDA-00961、但它似乎不再存在(我找不到它任何地方)。
我想知道是否有另一个使用 ePWM XLink 的示例?
此致、
基恩
尊敬的 Kien:
是、已删除 TIDA-00961参考设计。
我们没有任何现成的示例来展示 EPWMXLINK 功能的用例、但有一个 driverlib 函数、您可以直接在 EPWM 初始化中使用、实施起来没有困难。 请在 epwm.h 文件的以下代码片段中找到:
//*****************************************************************************
//
//! Sets the EPWM links.
//!
//! \param base is the base address of the EPWM module.
//! \param epwmLink is the ePWM instance to link with.
//! \param linkComp is the ePWM component to link.
//!
//! This function links the component defined in linkComp in the current ePWM
//! instance with the linkComp component of the ePWM instance defined by
//! epwmLink. A change (a write) in the value of linkComp component of epwmLink
//! instance, causes a change in the current ePWM linkComp component.
//! For example if the current ePWM is ePWM3 and the values of epwmLink and
//! linkComp are EPWM_LINK_WITH_EPWM_1 and EPWM_LINK_COMP_C respectively,
//! then a write to COMPC register in ePWM1, will result in a simultaneous
//! write to COMPC register in ePWM3.
//! Valid values for epwmLink are:
//! - EPWM_LINK_WITH_EPWM_1 - link current ePWM with ePWM1
//! - EPWM_LINK_WITH_EPWM_2 - link current ePWM with ePWM2
//! - EPWM_LINK_WITH_EPWM_3 - link current ePWM with ePWM3
//! - EPWM_LINK_WITH_EPWM_4 - link current ePWM with ePWM4
//! - EPWM_LINK_WITH_EPWM_5 - link current ePWM with ePWM5
//! - EPWM_LINK_WITH_EPWM_6 - link current ePWM with ePWM6
//! - EPWM_LINK_WITH_EPWM_7 - link current ePWM with ePWM7
//! - EPWM_LINK_WITH_EPWM_8 - link current ePWM with ePWM8
//! - EPWM_LINK_WITH_EPWM_9 - link current ePWM with ePWM9
//! - EPWM_LINK_WITH_EPWM_10 - link current ePWM with ePWM10
//! - EPWM_LINK_WITH_EPWM_11 - link current ePWM with ePWM11
//! - EPWM_LINK_WITH_EPWM_12 - link current ePWM with ePWM12
//!
//! Valid values for linkComp are:
//! - EPWM_LINK_TBPRD - link TBPRD:TBPRDHR registers
//! - EPWM_LINK_COMP_A - link COMPA registers
//! - EPWM_LINK_COMP_B - link COMPB registers
//! - EPWM_LINK_COMP_C - link COMPC registers
//! - EPWM_LINK_COMP_D - link COMPD registers
//! - EPWM_LINK_GLDCTL2 - link GLDCTL2 registers
//!
//! \return None.
//
//*****************************************************************************
static inline void
EPWM_setupEPWMLinks(uint32_t base, EPWM_CurrentLink epwmLink,
EPWM_LinkComponent linkComp)
{
//
// Check the arguments
//
ASSERT(EPWM_isBaseValid(base));
uint32_t registerOffset;
registerOffset = base + EPWM_O_XLINK;
//
// Configure EPWM links
//
HWREG(registerOffset) =
((HWREG(registerOffset) & ~((uint32_t)EPWM_XLINK_TBPRDLINK_M << (uint32_t)linkComp)) |
((uint32_t)epwmLink << (uint32_t)linkComp));
}
此致、
艾里森