CANopen开启PDO定时发送后心跳帧时间错误,PDO迟迟不发送,CANopen时间轴错乱
CANopen的例子中,一种使用很多也很简单的方式是用一个1ms定时器中断,然后用全局变量重写sertimer和getElapsedTime函数,然后中断服务函数中加入timerForCan//Set the next alarm //void setTimer(TIMEVAL value){ NextTime=(TimeCNT+value)%TIMER_MAX_COUNT;}// Get the elapsed time since the last occured alarm