ZHCU083I January 2013 – October 2021 TMS320F2802-Q1 , TMS320F28026-Q1 , TMS320F28026F , TMS320F28027-Q1 , TMS320F28027F , TMS320F28027F-Q1 , TMS320F28052-Q1 , TMS320F28052F , TMS320F28052F-Q1 , TMS320F28052M , TMS320F28052M-Q1 , TMS320F28054-Q1 , TMS320F28054F , TMS320F28054F-Q1 , TMS320F28054M , TMS320F28054M-Q1 , TMS320F2806-Q1 , TMS320F28062-Q1 , TMS320F28062F , TMS320F28062F-Q1 , TMS320F28068F , TMS320F28068M , TMS320F28069-Q1 , TMS320F28069F , TMS320F28069F-Q1 , TMS320F28069M , TMS320F28069M-Q1
利用抽取率,用户可以配置各个循环速率以满足相应的代码执行要求。建议使用默认抽取率作为起始点。用户必须验证是否满足实时调度,从而验证单次中断期间是否允许在 ISR 中执行所有软件。只需在 ISR 中两 (2) 次切换 GPIO 引脚(一次在 ISR 开始执行时,一次在 ISR 结束执行时)并观察示波器即可完成上述操作。如果不满足实时调度,则不能预测 InstaSPIN 性能。
为使 InstaSPIN 性能一致,需要进行实时调度。
以下是默认抽取率:
// Defines the number of pwm clock ticks per isr clock tick
// Note: Valid values are 1, 2 or 3 only
#define USER_NUM_PWM_TICKS_PER_ISR_TICK (1)
// Defines the number of isr ticks (hardware) per controller clock tick (software)
#define USER_NUM_ISR_TICKS_PER_CTRL_TICK (1)
// Defines the number of controller clock ticks per estimator clock tick
#define USER_NUM_CTRL_TICKS_PER_EST_TICK (1)
// Defines the number of controller clock ticks per current controller clock tick
#define USER_NUM_CTRL_TICKS_PER_CURRENT_TICK (1)
// Defines the number of controller clock ticks per speed controller clock tick
#define USER_NUM_CTRL_TICKS_PER_SPEED_TICK (10)
// Defines the number of controller clock ticks per trajectory clock tick
#define USER_NUM_CTRL_TICKS_PER_TRAJ_TICK (10)
如果中断期间不允许完成这些抽取率,请参阅 Topic Link Label10.2了解有关更改抽取率的更多信息。