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.
我在运行此示例时更改了 TMS570LS1224板的引脚。
training.ti.com/hercules-how-tutorial-using-nhet-generate-pwm
我启用了 HET1驱动程序并在占空比为60%且时间周期为1000us 的 halcogen 代码发生器中配置了 NHET[16]。 还启用对应于引脚16的输出方向。
之后,我生成了代码并包含在 CCS 项目中(同一工作区文件夹)。 在 sys_main.c 中,我编写了以下代码:
/*用户代码开始(0)*/
#include "het.h"
/*用户代码结束*/
/*包含文件*/
#include "sys_common.h"
#include "system.h"
/*用户代码开始(1)*/
/*用户代码结束*/
/**@fn void main (void)
* @应用程序主函数简介
* @请注意、默认情况下、此函数为空。
*
* 此函数在启动后调用。
* 用户可以使用此函数来实现应用程序。
*
/*用户代码开始(2)*/
/*用户代码结束*/
void main (void)
{
/*用户代码开始(3)*/
hetInit();
while (1){}
/*用户代码结束*/
}
/*用户代码开始(4)*/
void esmGroup1通知(int 位)
{
返回;
}
void esmGroup2Notification (int 位)
{
返回;
}
void pwmNotification (nhetBASE-t * nhetREG、无符号 PWM、无符号通知)
{
返回;
}
void edgeNotification (nhetBASE-t * nhetREG、无符号边沿)
{
返回;
}
/*用户代码结束*/
在编译代码时、我收到以下错误消息。
#20标识符"nhetBASE-t"未定义 sys_main.c /watchdog/source 第89行 C/C++问题
请将 nhetBASE-t 替换为 在 reg_het.c 中定义的 hetBASE-t
视频中也错过了这一问题。 感谢王的建议。 请告诉我您从何处获得这些信息。
结构在 reg_het.h 中声明:
您是否在将 nhetBASE-t 替换为 hetBASE-t 后使示例有效?
是的、王、感谢您的建议。 该示例在执行您的建议后正常工作。